]> git.pld-linux.org Git - packages/lin_tape.git/commitdiff
- up to 3.0.23 auto/th/lin_tape-3.0.23-1
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 7 Apr 2018 23:19:09 +0000 (01:19 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 7 Apr 2018 23:19:09 +0000 (01:19 +0200)
- updated patches
- added fix for building with kernels 4.15+

clean-ifdefs.patch
kernel-4.15.patch [new file with mode: 0644]
lin_tape.fixlist
lin_tape.spec
linux-4.10.patch
linux-4.13.patch
linux-4.9.patch

index 3d6382a6f7d31c04aca5c3ae47ce71453d060614..12db4e996bb369b3dfe2aa1c24835fcb0c9368b4 100644 (file)
@@ -20,7 +20,7 @@ diff -ur lin_tape-3.0.18/Makefile lin_tape-3.0.18-ifdefs/Makefile
 diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h
 --- lin_tape-3.0.18/pfo.h      2017-02-23 19:14:41.000000000 +0100
 +++ lin_tape-3.0.18-ifdefs/pfo.h       2017-05-09 21:06:34.117699008 +0200
-@@ -26,109 +26,6 @@
+@@ -26,133 +26,6 @@
   * will build for various releases of Linux.  This is how
   * we track different versions using ifdef in the source.
   */
@@ -94,6 +94,18 @@ diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h
 -#define BEFORE_RH_71 1
 -#define BEFORE_RH_72 1
 -#endif
+-#ifdef KERNELVERSION_2_6_32_696
+-#define AFTER_RH_62 1
+-#define AFTER_RH_63 1
+-#define AFTER_RH_64 1
+-#define AFTER_RH_65 1
+-#define AFTER_RH_66 1
+-#define AFTER_RH_67 1
+-#define AFTER_RH_68 1
+-#define BEFORE_RH_70 1
+-#define BEFORE_RH_71 1
+-#define BEFORE_RH_72 1
+-#endif
 -#ifdef KERNELVERSION_3_10_0_123
 -#define AFTER_RH_62 1
 -#define AFTER_RH_63 1
@@ -127,13 +139,25 @@ diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h
 -#define AFTER_RH_71 1
 -#endif
 -#ifdef KERNELVERSION_3_10_0_514
+-#define AFTER_RH_62 1
+-#define AFTER_RH_63 1
+-#define AFTER_RH_64 1
+-#define AFTER_RH_65 1
+-#define AFTER_RH_66 1
+-#define AFTER_RH_67 1
+-#define AFTER_RH_6x 1
+-#define AFTER_RH_70 1
+-#define AFTER_RH_71 1
+-#define AFTER_RH_72 1
+-#endif
+-#ifdef KERNELVERSION_3_10_0_693
  #define AFTER_RH_62 1
  #define AFTER_RH_63 1
  #define AFTER_RH_64 1
 @@ -126,7 +35,6 @@
- #define AFTER_RH_70 1
  #define AFTER_RH_71 1
  #define AFTER_RH_72 1
+ #define AFTER_RH_73 1
 -#endif
  
  /* Misc defines needed so source is same for all versions of Linux */
diff --git a/kernel-4.15.patch b/kernel-4.15.patch
new file mode 100644 (file)
index 0000000..15efac9
--- /dev/null
@@ -0,0 +1,34 @@
+diff -ur lin_tape-3.0.23/upper.c lin_tape-3.0.23.iov/upper.c
+--- lin_tape-3.0.23/upper.c    2018-04-07 22:18:09.417415364 +0200
++++ lin_tape-3.0.23.iov/upper.c        2018-04-07 22:19:26.582769230 +0200
+@@ -388,6 +388,22 @@
+       if (hdr->iovec_count) {
+               const int size = sizeof(struct sg_iovec) * hdr->iovec_count;
+               size_t iov_data_len;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
++              struct iov_iter i;
++
++              sg_iov = kmalloc(size, GFP_KERNEL);
++              if (!sg_iov) {
++                      ret = -ENOMEM;
++                      goto out;
++              }
++
++              ret = import_iovec(hdr->dxfer_direction == SG_DXFER_TO_DEV ? WRITE : READ, hdr->dxferp, hdr->iovec_count, 0, (struct iovec **)&sg_iov, &i);
++              if (ret < 0)
++                      goto out;
++
++              iov_iter_truncate(&i, hdr->dxfer_len);
++              iov_data_len = hdr->dxfer_len;
++#else
+               struct iovec *iov;
+               int i;
+@@ -426,6 +442,7 @@
+                                                       hdr->dxfer_len);
+                       iov_data_len = hdr->dxfer_len;
+               }
++#endif
+               pfo_cmd.buffer = sg_iov;
+               pfo_cmd.bufflen = iov_data_len;
index 8d5af8e9d40aeb5c6cd587bd5603fcab967e793b..526d7adab79218681df7a5805c1ba31a2c305fb4 100644 (file)
@@ -4,6 +4,17 @@ Fixlist for Linux IBM Tape Device Driver (lin_tape)
 \r
  Level      Date                   Description\r
 ---------------------------------------------------------------\r
+3.0.23 11/03/2017   - Initial support for RHEL 6.9 (min. kernel version 2.6.32-696)\r
+                    - Support for LTO8\r
+                    - Fix for reservation conflict when reserve_6 used\r
+                    - Fix for failover after device rediscovery (introduced at 3.0.20)\r
+                    - Fix for device name after removal (introduced at 3.0.20)\r
+                    - Fix for read with resid through join interface\r
+3.0.21 09/14/2017   - Fix to process sense data from srb combination flags\r
+                    - Enhancement to not attempt failover when only one path left\r
+                    - Fix for crash on concurrency (multiple process attempting to use the same device in stress scenario)\r
+                    - Fix for returning ENXIO instead attempting failover (introduced at 3.0.20)\r
+                    - Join driver to retry attachment on LUN not serlf configured\r
 3.0.20 06/09/2017   - Reincorporated join driver (lin_tape_as_sfmp) with new build flag: -with sfmp\r
                     - Work around for wrong SN reported by Inq. page 80h after failback\r
                     - Fix for crash when HBA driver removed before lin_tape\r
@@ -15,7 +26,7 @@ Fixlist for Linux IBM Tape Device Driver (lin_tape)
                     - Initial support for SLES 12 SP2 (min. kernel version 4.4.21-69)\r
                     - Initial support for RHEL 7.3 (min. kernel version 3.10.0-514)\r
                     - Initial support for RHEL 7.3 Power LE (min. kernel version 3.10.0-514)\r
-                    - Initial support for TS1155\r
+                    - Support for TS4300\r
 3.0.18 03/08/2017   - Prevent crash from double delete objects on removal during wait scenarios (introduced at 2.2.0)\r
                     - lin_tape_as_sfmp not supported in this version\r
                     - Installation for blacklist.conf enhancements\r
index 3d2d576598f1cb7853a80a1431e84721468c73ee..43d1605ae317c920743a8117ff150bf4680a0642 100644 (file)
@@ -5,16 +5,16 @@
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
 
-%define                rel     3
+%define                rel     1
 %define                pname   lin_tape
 Summary:       IBM Tape SCSI Device Driver for Linux
 Name:          %{pname}%{_alt_kernel}
-Version:       3.0.20
+Version:       3.0.23
 Release:       %{rel}%{?_pld_builder:@%{_kernel_ver_str}}
 License:       GPL v2/LGPL
 Group:         Base/Kernel
 Source0:       %{pname}-%{version}.tgz
-# Source0-md5: e9780677ade7969498032f10611a3bb6
+# Source0-md5: 38edd3855f4205250cb725df6a8ef2a3
 Source1:       %{pname}.fixlist
 Patch0:                use-module-dir.patch
 Patch1:                clean-ifdefs.patch
@@ -24,6 +24,7 @@ Patch4:               linux-4.11.patch
 Patch5:                linux-4.12.patch
 Patch6:                linux-4.13.patch
 Patch7:                kernel-4.14.patch
+Patch8:                kernel-4.15.patch
 # System Storage, Tape systems, Tape drivers and software, Tape device drivers (Linux)
 URL:           http://www.ibm.com/support/fixcentral/
 BuildRequires: rpmbuild(macros) >= 1.701
@@ -79,6 +80,7 @@ compatible platforms.\
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 install -p %{SOURCE1} .
 
index 0e90019c74e783ed80e48996e0c248f1aab2f6c2..a6f123e74a0884400236ef774a7c2f20885dc34a 100644 (file)
-diff -ur lin_tape-3.0.8/lin_tape_ioctl_tape.c lin_tape-3.0.8-4.10/lin_tape_ioctl_tape.c
---- lin_tape-3.0.8/lin_tape_ioctl_tape.c       2016-02-23 20:57:52.000000000 +0100
-+++ lin_tape-3.0.8-4.10/lin_tape_ioctl_tape.c  2017-03-25 21:10:22.094478668 +0100
-@@ -6456,7 +6456,11 @@
+diff -ur lin_tape-3.0.23/lin_tape_ioctl_tape.c lin_tape-3.0.23-4.10/lin_tape_ioctl_tape.c
+--- lin_tape-3.0.23/lin_tape_ioctl_tape.c      2018-04-08 00:40:34.811170201 +0200
++++ lin_tape-3.0.23-4.10/lin_tape_ioctl_tape.c 2018-04-08 00:39:08.512197099 +0200
+@@ -6471,7 +6471,7 @@
  
        tmp_rq = (void*)sdev->request_queue;
        req->cmd_type = REQ_TYPE_BLOCK_PC;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,73)
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
        req->cmd_flags |= REQ_QUIET;
-+#else
-+      req->cmd_flags |= RQF_QUIET;
-+#endif
-       if(buf_len) {
-               mdata = kmalloc(sizeof(struct rq_map_data), GFP_KERNEL);
-diff -ur lin_tape-3.0.8/stmp.c lin_tape-3.0.8-4.10/stmp.c
---- lin_tape-3.0.8/stmp.c      2017-03-25 21:11:10.039325377 +0100
-+++ lin_tape-3.0.8-4.10/stmp.c 2017-03-25 21:10:48.338642620 +0100
-@@ -624,7 +624,11 @@
+ #else
+       req->cmd_flags |= RQF_QUIET;
+diff -ur lin_tape-3.0.23/stmp.c lin_tape-3.0.23-4.10/stmp.c
+--- lin_tape-3.0.23/stmp.c     2018-04-08 00:40:34.814503623 +0200
++++ lin_tape-3.0.23-4.10/stmp.c        2018-04-08 00:39:45.023173000 +0200
+@@ -688,7 +688,7 @@
  #else
        req->cmd_type = REQ_TYPE_BLOCK_PC;
  #endif
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,73)
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
        req->cmd_flags |= REQ_QUIET;
-+#else
-+      req->cmd_flags |= RQF_QUIET;
-+#endif
-       mdata->null_mapped = 1;
-diff -ur lin_tape-3.0.8/upper.c lin_tape-3.0.8-4.10/upper.c
---- lin_tape-3.0.8/upper.c     2017-03-25 21:11:10.022658187 +0100
-+++ lin_tape-3.0.8-4.10/upper.c        2017-03-25 21:09:10.232174474 +0100
-@@ -89,7 +89,11 @@
+ #else
+       req->cmd_flags |= RQF_QUIET;
+diff -ur lin_tape-3.0.23/upper.c lin_tape-3.0.23-4.10/upper.c
+--- lin_tape-3.0.23/upper.c    2018-04-08 00:40:34.814503623 +0200
++++ lin_tape-3.0.23-4.10/upper.c       2018-04-08 00:40:20.187446091 +0200
+@@ -89,7 +89,7 @@
        pfo_cmd.timeout = timeout;
        pfo_cmd.retries = retries;
        pfo_cmd.iov_count = 0;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,73)
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
        pfo_cmd.flags = flags | REQ_QUIET;
-+#else
-+      pfo_cmd.flags = flags | RQF_QUIET;
-+#endif
-       pfo_cmd.mdata = NULL;
-       pfo_cmd.raw_sense = sense;
-       pfo_cmd.sense_len = 0;
-@@ -338,7 +342,11 @@
+ #else
+       pfo_cmd.flags = flags | RQF_QUIET;
+@@ -352,7 +352,7 @@
        pfo_cmd.cmd_len = hdr->cmd_len;
        pfo_cmd.buffer = NULL;
        pfo_cmd.bufflen = 0;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,73)
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
        pfo_cmd.flags = REQ_QUIET;
-+#else
-+      pfo_cmd.flags = RQF_QUIET;
-+#endif
-       pfo_cmd.source = PFO_SOURCE_IOCTL;
-       pfo_cmd.iov_count = 0;
-       pfo_cmd.mdata = NULL;
-@@ -453,7 +461,11 @@
+ #else
+       pfo_cmd.flags = RQF_QUIET;
+@@ -488,7 +488,7 @@
        pfo_cmd.cmd_len = hdr->cmd_len;
        pfo_cmd.buffer = NULL;
        pfo_cmd.bufflen = 0;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,73)
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
        pfo_cmd.flags = REQ_QUIET;
-+#else
-+      pfo_cmd.flags = RQF_QUIET;
-+#endif
-       pfo_cmd.source = PFO_SOURCE_IOCTL;
-       pfo_cmd.iov_count = 0;
-       pfo_cmd.mdata = NULL;
-@@ -658,7 +670,11 @@
+ #else
+       pfo_cmd.flags = RQF_QUIET;
+@@ -691,7 +691,7 @@
        pfo_cmd.timeout = timeout;
        pfo_cmd.retries = retries;
        pfo_cmd.iov_count = 0;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,73)
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
        pfo_cmd.flags = REQ_QUIET;
-+#else
-+      pfo_cmd.flags = RQF_QUIET;
-+#endif
-       pfo_cmd.mdata = NULL;
-       pfo_cmd.raw_sense = sense;
-       pfo_cmd.sense_len = 0;
-@@ -915,7 +931,11 @@
+ #else
+       pfo_cmd.flags = RQF_QUIET;
+@@ -952,7 +952,7 @@
        pfo_cmd.buffer = buffer;
        pfo_cmd.bufflen = bufflen;
        pfo_cmd.retries = retries;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,73)
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
        pfo_cmd.flags = REQ_QUIET;
-+#else
-+      pfo_cmd.flags = RQF_QUIET;
-+#endif
-       pfo_cmd.source = PFO_SOURCE_SG;
-       pfo_cmd.iov_count = iov_count;
-       pfo_cmd.mdata = mdata;
-@@ -954,7 +974,11 @@
+ #else
+       pfo_cmd.flags = RQF_QUIET;
+@@ -995,7 +995,7 @@
        pfo_cmd.buffer = buffer;
        pfo_cmd.bufflen = bufflen;
        pfo_cmd.retries = retries;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,73)
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
        pfo_cmd.flags = REQ_QUIET;
-+#else
-+      pfo_cmd.flags = RQF_QUIET;
-+#endif
-       pfo_cmd.source = PFO_SOURCE_ST;
-       pfo_cmd.iov_count = 0;
-       pfo_cmd.mdata = mdata;
+ #else
+       pfo_cmd.flags = RQF_QUIET;
index e8228d3bdc82916e50f8d1476281cb5f54015a32..ae03180ccd4d85659daff71a00a1f37417e24776 100644 (file)
@@ -18,7 +18,7 @@
        }
  
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0)
 +      scsi_req_init(scsi_req(rq));
 +#else
        scsi_req_init(rq);
index 78e28b4a49e62d2894232fe6cdbc43c948e56fcd..d35ff3b542f897d8d9b639a19f7465e049b13bca 100644 (file)
@@ -1,24 +1,30 @@
 --- lin_tape-3.0.18/lin_tape_scsi_tape.c~      2017-02-23 19:14:41.000000000 +0100
 +++ lin_tape-3.0.18/lin_tape_scsi_tape.c       2017-05-09 21:28:19.916320963 +0200
-@@ -11838,7 +11838,10 @@
+@@ -11838,10 +11838,9 @@
  
        down_read(&current->mm->mmap_sem);
  
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,73)
+-      mapped_pages = get_user_pages_unlocked((unsigned long)user_location, number_pages,
+-                                            pages, rw);
+-
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
 +      mapped_pages = get_user_pages((ulong)user_location, number_pages,
 +                                            rw ? FOLL_WRITE : 0, pages, NULL);
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
        mapped_pages = get_user_pages((ulong)user_location, number_pages,
                                              rw, 0, pages, NULL);
- #else
 --- lin_tape-3.0.18/stmp.c~    2017-05-09 21:25:12.000000000 +0200
 +++ lin_tape-3.0.18/stmp.c     2017-05-09 21:29:19.121101188 +0200
-@@ -5205,7 +5205,14 @@
+@@ -5205,11 +5205,13 @@
        if ((pages = kmalloc(max_pages * sizeof(*pages), GFP_KERNEL)) == NULL)
                return -ENOMEM;
  
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,73)
+-      res = get_user_pages_unlocked(uaddr, nr_pages,
+-                                            pages,
+-                                                                rw == READ ? FOLL_WRITE : 0); /* don't force */
+-
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
 +      res = get_user_pages_unlocked(
 +              uaddr,
@@ -26,7 +32,6 @@
 +              rw == READ ? FOLL_WRITE : 0,
 +              pages,
 +              NULL);
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
      /* Try to fault in all of the necessary pages */
      /* rw==READ means read from drive, write into memory area */
-       res = get_user_pages_unlocked(
This page took 0.088466 seconds and 4 git commands to generate.