[packages/lin_tape] - updated to 3.0.20
baggins
baggins at pld-linux.org
Tue Aug 1 15:13:43 CEST 2017
commit 9752ce8d4cdc4d06000782f78fe9dd848dbfd22b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Aug 1 15:13:27 2017 +0200
- updated to 3.0.20
clean-ifdefs.patch | 30 +++++++++++++++++++++---------
lin_tape.fixlist | 13 +++++++++++++
lin_tape.spec | 6 ++++--
linux-4.10.patch | 4 ++--
linux-4.11.patch | 30 ------------------------------
linux-4.12.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
linux-4.9.patch | 18 +++++++++---------
7 files changed, 101 insertions(+), 52 deletions(-)
---
diff --git a/lin_tape.spec b/lin_tape.spec
index 52db0ea..dd98a86 100644
--- a/lin_tape.spec
+++ b/lin_tape.spec
@@ -9,18 +9,19 @@
%define pname lin_tape
Summary: IBM Tape SCSI Device Driver for Linux
Name: %{pname}%{_alt_kernel}
-Version: 3.0.18
+Version: 3.0.20
Release: %{rel}%{?_pld_builder:@%{_kernel_ver_str}}
License: GPL v2/LGPL
Group: Base/Kernel
Source0: %{pname}-%{version}.tgz
-# Source0-md5: c82336b8402f1eeadf440e7173895f17
+# Source0-md5: e9780677ade7969498032f10611a3bb6
Source1: %{pname}.fixlist
Patch0: use-module-dir.patch
Patch1: clean-ifdefs.patch
Patch2: linux-4.9.patch
Patch3: linux-4.10.patch
Patch4: linux-4.11.patch
+Patch5: linux-4.12.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
@@ -73,6 +74,7 @@ compatible platforms.\
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
install -p %{SOURCE1} .
diff --git a/clean-ifdefs.patch b/clean-ifdefs.patch
index 1a4f8fd..3d6382a 100644
--- a/clean-ifdefs.patch
+++ b/clean-ifdefs.patch
@@ -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,97 +26,6 @@
+@@ -26,109 +26,6 @@
* will build for various releases of Linux. This is how
* we track different versions using ifdef in the source.
*/
@@ -89,6 +89,7 @@ diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h
-#define AFTER_RH_64 1
-#define AFTER_RH_65 1
-#define AFTER_RH_66 1
+-#define AFTER_RH_67 1
-#define BEFORE_RH_70 1
-#define BEFORE_RH_71 1
-#define BEFORE_RH_72 1
@@ -115,13 +116,24 @@ diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h
-#define BEFORE_RH_72 1
-#endif
-#ifdef KERNELVERSION_3_10_0_327
+-#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
+-#endif
+-#ifdef KERNELVERSION_3_10_0_514
#define AFTER_RH_62 1
#define AFTER_RH_63 1
#define AFTER_RH_64 1
@@ -126,7 +35,6 @@
- #define AFTER_RH_6x 1
#define AFTER_RH_70 1
#define AFTER_RH_71 1
+ #define AFTER_RH_72 1
-#endif
/* Misc defines needed so source is same for all versions of Linux */
@@ -170,8 +182,8 @@ diff -ur lin_tape-3.0.18/sgmp.c lin_tape-3.0.18-ifdefs/sgmp.c
if ((sdp->sgdebug > 0) &&
((CHECK_CONDITION == srp->header.masked_status) ||
(COMMAND_TERMINATED == srp->header.masked_status)))
--#ifdef AFTER_RH_71
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+-#if defined(AFTER_RH_71) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
__scsi_print_sense(sdp->device, "sg_cmd_done", sense, SCSI_SENSE_BUFFERSIZE);
#else
@@ -200,17 +212,17 @@ diff -ur lin_tape-3.0.18/stmp.c lin_tape-3.0.18-ifdefs/stmp.c
SRpnt->cmd[0], SRpnt->cmd[1], SRpnt->cmd[2],
SRpnt->cmd[3], SRpnt->cmd[4], SRpnt->cmd[5]);
if (cmdstatp->have_sense)
--#ifdef AFTER_RH_70
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+-#if defined(AFTER_RH_70) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
__scsi_print_sense(STp->device, name, SRpnt->sense, SCSI_SENSE_BUFFERSIZE);
#else
@@ -475,7 +475,7 @@
- scode != VOLUME_OVERFLOW &&
SRpnt->cmd[0] != MODE_SENSE &&
SRpnt->cmd[0] != TEST_UNIT_READY) {
--#ifdef AFTER_RH_71
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+
+-#if defined(AFTER_RH_71) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
__scsi_print_sense(STp->device, name, SRpnt->sense, SCSI_SENSE_BUFFERSIZE);
#else
diff --git a/lin_tape.fixlist b/lin_tape.fixlist
index 41ad2c9..8d5af8e 100644
--- a/lin_tape.fixlist
+++ b/lin_tape.fixlist
@@ -4,9 +4,22 @@ Fixlist for Linux IBM Tape Device Driver (lin_tape)
Level Date Description
---------------------------------------------------------------
+3.0.20 06/09/2017 - Reincorporated join driver (lin_tape_as_sfmp) with new build flag: -with sfmp
+ - Work around for wrong SN reported by Inq. page 80h after failback
+ - Fix for crash when HBA driver removed before lin_tape
+ - Fix for mismatching device SN on failback
+ - Fix for busy waits
+ - Fix for file systems removals
+ - Fix for file systems attributes names
+ - Fix for column width at /proc/IBM for SN
+ - Initial support for SLES 12 SP2 (min. kernel version 4.4.21-69)
+ - Initial support for RHEL 7.3 (min. kernel version 3.10.0-514)
+ - Initial support for RHEL 7.3 Power LE (min. kernel version 3.10.0-514)
+ - Initial support for TS1155
3.0.18 03/08/2017 - Prevent crash from double delete objects on removal during wait scenarios (introduced at 2.2.0)
- lin_tape_as_sfmp not supported in this version
- Installation for blacklist.conf enhancements
+ - Support for TS1155
3.0.16 01/06/2017 - Prevent crash introduced at 1.75.0 cleaning buffern and length on WRA during open
- Prevent lock/crash introduced at 1.75.0 when device removal during open
- Added dualaccesor_cpf for TSLM usage
diff --git a/linux-4.10.patch b/linux-4.10.patch
index bb1b367..0e90019 100644
--- a/linux-4.10.patch
+++ b/linux-4.10.patch
@@ -17,9 +17,9 @@ 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 @@
- return DRIVER_ERROR << 24;
-
+ #else
req->cmd_type = REQ_TYPE_BLOCK_PC;
+ #endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
req->cmd_flags |= REQ_QUIET;
+#else
diff --git a/linux-4.11.patch b/linux-4.11.patch
index cfd6346..d3639d5 100644
--- a/linux-4.11.patch
+++ b/linux-4.11.patch
@@ -69,21 +69,6 @@ diff -ur lin_tape-3.0.18/lin_tape_ioctl_tape.c lin_tape-3.0.18-4.11/lin_tape_ioc
status_code = req->errors;
if(buf_len && !use_sg) {
-diff -ur lin_tape-3.0.18/lin_tape_ioctl_tape.c.orig lin_tape-3.0.18-4.11/lin_tape_ioctl_tape.c.orig
---- lin_tape-3.0.18/lin_tape_ioctl_tape.c.orig 2017-02-23 19:14:41.000000000 +0100
-+++ lin_tape-3.0.18-4.11/lin_tape_ioctl_tape.c.orig 2017-05-09 21:45:14.232900215 +0200
-@@ -6465,7 +6465,11 @@
-
- tmp_rq = (void*)sdev->request_queue;
- req->cmd_type = REQ_TYPE_BLOCK_PC;
-+#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.18/lin_tape_tape.h lin_tape-3.0.18-4.11/lin_tape_tape.h
--- lin_tape-3.0.18/lin_tape_tape.h 2017-02-23 19:14:41.000000000 +0100
+++ lin_tape-3.0.18-4.11/lin_tape_tape.h 2017-05-09 21:45:14.236233622 +0200
@@ -195,18 +180,3 @@ diff -ur lin_tape-3.0.18/lower.c lin_tape-3.0.18-4.11/lower.c
pfo_cmd->errors = rq->errors;
blk_put_request(rq);
-diff -ur lin_tape-3.0.18/stmp.c lin_tape-3.0.18-4.11/stmp.c
---- lin_tape-3.0.18/stmp.c 2017-05-10 00:36:01.955619894 +0200
-+++ lin_tape-3.0.18-4.11/stmp.c 2017-05-09 21:45:14.236233622 +0200
-@@ -611,7 +611,11 @@
- if (!req)
- return DRIVER_ERROR << 24;
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
-+ scsi_req_init(req);
-+#else
- req->cmd_type = REQ_TYPE_BLOCK_PC;
-+#endif
- #if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
- req->cmd_flags |= REQ_QUIET;
- #else
diff --git a/linux-4.12.patch b/linux-4.12.patch
new file mode 100644
index 0000000..7699c7b
--- /dev/null
+++ b/linux-4.12.patch
@@ -0,0 +1,52 @@
+--- lin_tape-3.0.20/lin_tape_ioctl_tape.c.orig 2017-08-01 15:02:29.400676838 +0200
++++ lin_tape-3.0.20/lin_tape_ioctl_tape.c 2017-08-01 15:08:53.208605776 +0200
+@@ -6554,7 +6554,11 @@
+ req->sense_len = 0;
+ #endif
+ req->timeout = timeout;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ scsi_req(req)->retries = 0;
++#else
+ req->retries = 0;
++#endif
+
+ blk_execute_rq(req->q, NULL, req, 1);
+
+@@ -6563,7 +6567,11 @@
+ #else
+ *resid = req->resid_len;
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ status_code = scsi_req(req)->result;
++#else
+ status_code = req->errors;
++#endif
+
+ if(buf_len && !use_sg) {
+ buf_ptr = (char*)buffer;
+--- lin_tape-3.0.20/lower.c.orig 2017-08-01 15:09:52.565988839 +0200
++++ lin_tape-3.0.20/lower.c 2017-08-01 15:11:23.877092947 +0200
+@@ -568,7 +568,11 @@
+ rq->sense_len = 0;
+ #endif
+ rq->timeout = pfo_cmd->timeout;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ scsi_req(rq)->retries = pfo_cmd->retries;
++#else
+ rq->retries = pfo_cmd->retries;
++#endif
+ rq->end_io_data = pfo_cmd;
+
+ blk_execute_rq(rq->q, NULL, rq, 1);
+@@ -589,7 +593,11 @@
+ pfo_cmd->resid_len = rq->resid_len;
+ pfo_cmd->sense_len = rq->sense_len;
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ pfo_cmd->errors = scsi_req(rq)->result;
++#else
+ pfo_cmd->errors = rq->errors;
++#endif
+
+ blk_put_request(rq);
+ return pfo_cmd->errors;
diff --git a/linux-4.9.patch b/linux-4.9.patch
index 4fb0e43..78e28b4 100644
--- a/linux-4.9.patch
+++ b/linux-4.9.patch
@@ -15,18 +15,18 @@
--- 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 @@
- /* Try to fault in all of the necessary pages */
- down_read(¤t->mm->mmap_sem);
- /* rw==READ means read from drive, write into memory area */
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+ 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,9,0)
-+ res = get_user_pages(
++ res = get_user_pages_unlocked(
+ uaddr,
+ nr_pages,
+ rw == READ ? FOLL_WRITE : 0,
+ pages,
+ NULL);
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
- res = get_user_pages(
- uaddr,
- nr_pages,
++#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(
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lin_tape.git/commitdiff/9752ce8d4cdc4d06000782f78fe9dd848dbfd22b
More information about the pld-cvs-commit
mailing list