[Pkg-iscsi-maintainers] [SCM] Debian iscsitarget packaging branch, master, updated. debian/1.4.20.2-10-5-g144d6b6

Ritesh Raj Sarraf rrs at debian.org
Wed Mar 20 19:00:31 UTC 2013


The following commit has been merged in the master branch:
commit 7fc85536e5b5ccc34def5fc1562fcd31c4c572bf
Author: Ritesh Raj Sarraf <rrs at researchut.com>
Date:   Sat Sep 15 12:53:59 2012 +0530

    Add patches from 1.4.20 stable branch
    
    0001-Makefile-changes-to-support-3.x-kernels.patch
    0002-Fix-send_data_rsp-to-handle-sense-data-correctly.patch
    0003-Compile-fix-for-kernels-3.1-and-3.2.patch
    
    Really add the patches
    
    update changelog
    
    prepare changelog

diff --git a/debian/changelog b/debian/changelog
index 957132a..d79aab8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+iscsitarget (1.4.20.2-11) experimental; urgency=low
+
+  * [6dfdd7c] Add iscsitarget-dkms to Recommends and drop iscsitarget-module
+  * [281b4a4] Update README.Debian explaining the new DKMS package.
+    Thanks to Olaf van der Spek (Closes: #668382)
+  * [a0d484c] Drop patch fix-build-3-2.patch
+  * [afdf1df] Add patches from 1.4.20 stable branch (Closes: #685422)
+
+ -- Ritesh Raj Sarraf <rrs at debian.org>  Sat, 15 Sep 2012 12:55:24 +0530
+
 iscsitarget (1.4.20.2-10) unstable; urgency=low
 
   * [2bebbc2] don't prompt on modified conffiles.
diff --git a/debian/patches/0001-Makefile-changes-to-support-3.x-kernels.patch b/debian/patches/0001-Makefile-changes-to-support-3.x-kernels.patch
new file mode 100644
index 0000000..d35f3f1
--- /dev/null
+++ b/debian/patches/0001-Makefile-changes-to-support-3.x-kernels.patch
@@ -0,0 +1,50 @@
+From 4c3800c953722c6c39d0b47dc87289ed63c34aa8 Mon Sep 17 00:00:00 2001
+From: agr1 <agr1 at 48a34bb2-7106-0410-bc49-8aa7273d22a1>
+Date: Sat, 3 Sep 2011 11:51:08 +0000
+Subject: [PATCH 1/3] Makefile changes to support 3.x kernels
+
+This patch was provided by Leho Kraav
+
+Signed-off-by: Arne Redlich <arne.redlich at googlemail.com>
+
+git-svn-id: https://iscsitarget.svn.sourceforge.net/svnroot/iscsitarget/branches/1.4.20@454 48a34bb2-7106-0410-bc49-8aa7273d22a1
+---
+ Makefile |   18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 02ba273..b47f689 100644
+--- a/Makefile
++++ b/Makefile
+@@ -40,15 +40,23 @@ KMIN := $(shell echo $(KVER) | \
+ KREV := $(shell echo $(KVER) | \
+ 	sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/')
+ 
+-kver_eq = $(shell [ $(KMAJ)$(KMIN)$(KREV) -eq $(1)$(2)$(3) ] && \
++kver_eq = $(shell [ $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -eq $(3) ] && \
+ 	echo 1 || echo 0)
+-kver_lt = $(shell [ $(KMAJ)$(KMIN)$(KREV) -lt $(1)$(2)$(3) ] && \
++kver_lt = $(shell [ $(KMAJ) -lt $(1) -o \
++	$(KMAJ) -eq $(1) -a $(KMIN) -lt $(2) -o \
++        $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -lt $(3) ] && \
+ 	echo 1 || echo 0)
+-kver_le = $(shell [ $(KMAJ)$(KMIN)$(KREV) -le $(1)$(2)$(3) ] && \
++kver_le = $(shell [ $(KMAJ) -lt $(1) -o \
++        $(KMAJ) -eq $(1) -a $(KMIN) -lt $(2) -o \
++        $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -le $(3) ] && \
+ 	echo 1 || echo 0)
+-kver_gt = $(shell [ $(KMAJ)$(KMIN)$(KREV) -gt $(1)$(2)$(3) ] && \
++kver_gt = $(shell [ ( $(KMAJ) -gt $(1) ) -o \
++        $(KMAJ) -eq $(1) -a $(KMIN) -gt $(2) -o \
++        $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -gt $(3) ] && \
+ 	echo 1 || echo 0)
+-kver_ge = $(shell [ $(KMAJ)$(KMIN)$(KREV) -ge $(1)$(2)$(3) ] && \
++kver_ge = $(shell [ ( $(KMAJ) -gt $(1) ) -o \
++        $(KMAJ) -eq $(1) -a $(KMIN) -gt $(2) -o \
++        $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -ge $(3) ] && \
+ 	echo 1 || echo 0)
+ kver_lk = $(shell [ `echo $(KVER) | egrep $(1)` ] && echo 1 || echo 0)
+ 
+-- 
+1.7.10.4
+
diff --git a/debian/patches/0002-Fix-send_data_rsp-to-handle-sense-data-correctly.patch b/debian/patches/0002-Fix-send_data_rsp-to-handle-sense-data-correctly.patch
new file mode 100644
index 0000000..4e18aab
--- /dev/null
+++ b/debian/patches/0002-Fix-send_data_rsp-to-handle-sense-data-correctly.patch
@@ -0,0 +1,73 @@
+From 3cc03c303d2555034223d64788b47a4fe892156d Mon Sep 17 00:00:00 2001
+From: agr1 <agr1 at 48a34bb2-7106-0410-bc49-8aa7273d22a1>
+Date: Wed, 26 Oct 2011 17:54:07 +0000
+Subject: [PATCH 2/3] Fix send_data_rsp to handle sense data correctly
+
+Remove an overzealous BUG_ON and reorganize the code to cope with commands both
+with or without a tio.
+
+Signed-off-by: Arne Redlich <arne.redlich at googlemail.com>
+
+git-svn-id: https://iscsitarget.svn.sourceforge.net/svnroot/iscsitarget/branches/1.4.20@467 48a34bb2-7106-0410-bc49-8aa7273d22a1
+---
+ kernel/iscsi.c |   31 ++++++++++++++-----------------
+ 1 file changed, 14 insertions(+), 17 deletions(-)
+
+diff --git a/kernel/iscsi.c b/kernel/iscsi.c
+index 7a832e6..906c0ac 100644
+--- a/kernel/iscsi.c
++++ b/kernel/iscsi.c
+@@ -249,6 +249,9 @@ static void do_send_data_rsp(struct iscsi_cmnd *cmnd)
+ 	LIST_HEAD(send);
+ 
+ 	dprintk(D_GENERIC, "%p\n", cmnd);
++
++	BUG_ON(!cmnd->tio);
++
+ 	pdusize = conn->session->param.max_xmit_data_length;
+ 	expsize = cmnd_read_size(cmnd);
+ 	size = min(expsize, tio->size);
+@@ -383,29 +386,23 @@ void send_scsi_rsp(struct iscsi_cmnd *req, void (*func)(struct iscsi_cmnd *))
+ 
+ void send_data_rsp(struct iscsi_cmnd *req, void (*func)(struct iscsi_cmnd *))
+ {
+-	struct iscsi_cmnd *rsp;
+-	struct iscsi_scsi_rsp_hdr *rsp_hdr;
+-	u32 size;
+-
+ 	func(req);
+ 
+-	assert(req->tio);
+-
+-	size = min(req->tio->size, cmnd_read_size(req));
+-
+-	if (req->status == SAM_STAT_GOOD && size)
++	if (req->status == SAM_STAT_GOOD && req->tio && req->tio->size)
+ 		do_send_data_rsp(req);
+ 	else {
+-		rsp = create_scsi_rsp(req);
+-		rsp_hdr = (struct iscsi_scsi_rsp_hdr *) &rsp->pdu.bhs;
+-		if ((size = cmnd_read_size(req)) > req->tio->size) {
++		struct iscsi_cmnd *rsp = create_scsi_rsp(req);
++		struct iscsi_scsi_rsp_hdr *rsp_hdr =
++			(struct iscsi_scsi_rsp_hdr *) &rsp->pdu.bhs;
++		const u32 exp_size = cmnd_read_size(req);
++		const u32 size = req->tio ? req->tio->size : 0;
++
++		if (exp_size > size) {
+ 			rsp_hdr->flags |= ISCSI_FLG_RESIDUAL_UNDERFLOW;
+-			rsp_hdr->residual_count =
+-					cpu_to_be32(size - req->tio->size);
+-		} else if (size < req->tio->size) {
++			rsp_hdr->residual_count = cpu_to_be32(exp_size - size);
++		} else if (exp_size < size) {
+ 			rsp_hdr->flags |= ISCSI_FLG_RESIDUAL_OVERFLOW;
+-			rsp_hdr->residual_count =
+-					cpu_to_be32(req->tio->size - size);
++			rsp_hdr->residual_count = cpu_to_be32(size - exp_size);
+ 		}
+ 		iscsi_cmnd_init_write(rsp);
+ 	}
+-- 
+1.7.10.4
+
diff --git a/debian/patches/0003-Compile-fix-for-kernels-3.1-and-3.2.patch b/debian/patches/0003-Compile-fix-for-kernels-3.1-and-3.2.patch
new file mode 100644
index 0000000..0a552db
--- /dev/null
+++ b/debian/patches/0003-Compile-fix-for-kernels-3.1-and-3.2.patch
@@ -0,0 +1,55 @@
+From 91e08c6b4178cdd843e15a26032c35d8561b1790 Mon Sep 17 00:00:00 2001
+From: agr1 <agr1 at 48a34bb2-7106-0410-bc49-8aa7273d22a1>
+Date: Thu, 22 Mar 2012 21:25:18 +0000
+Subject: [PATCH 3/3] Compile fix for kernels 3.1 and 3.2
+
+Submitted by Emmanuel Florac <eflorac at intellique.com>
+
+git-svn-id: https://iscsitarget.svn.sourceforge.net/svnroot/iscsitarget/branches/1.4.20@469 48a34bb2-7106-0410-bc49-8aa7273d22a1
+---
+ kernel/event.c   |    1 +
+ kernel/iscsi.h   |    2 ++
+ kernel/nthread.c |    2 ++
+ 3 files changed, 5 insertions(+)
+
+diff --git a/kernel/event.c b/kernel/event.c
+index 240404d..3f18696 100644
+--- a/kernel/event.c
++++ b/kernel/event.c
+@@ -6,6 +6,7 @@
+  * Some functions are based on audit code.
+  */
+ 
++#include <linux/module.h>
+ #include <net/tcp.h>
+ #include "iet_u.h"
+ #include "iscsi_dbg.h"
+diff --git a/kernel/iscsi.h b/kernel/iscsi.h
+index da0cdfd..0a91bee 100644
+--- a/kernel/iscsi.h
++++ b/kernel/iscsi.h
+@@ -9,6 +9,8 @@
+ #define __ISCSI_H__
+ 
+ #include <linux/blkdev.h>
++#include <linux/module.h>
++#include <linux/completion.h>
+ #include <linux/completion.h>
+ #include <linux/pagemap.h>
+ #include <linux/seq_file.h>
+diff --git a/kernel/nthread.c b/kernel/nthread.c
+index a96ff89..db19544 100644
+--- a/kernel/nthread.c
++++ b/kernel/nthread.c
+@@ -6,6 +6,8 @@
+  * This code is licenced under the GPL.
+  */
+ 
++#include <linux/module.h>
++#include <linux/file.h>
+ #include <linux/sched.h>
+ #include <linux/file.h>
+ #include <linux/kthread.h>
+-- 
+1.7.10.4
+
diff --git a/debian/patches/series b/debian/patches/series
index cdac0f5..f267d0c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,4 @@
 iscsitarget-prelim-1.4.20.3.patch
+0001-Makefile-changes-to-support-3.x-kernels.patch
+0002-Fix-send_data_rsp-to-handle-sense-data-correctly.patch
+0003-Compile-fix-for-kernels-3.1-and-3.2.patch

-- 
Debian iscsitarget packaging



More information about the Pkg-iscsi-maintainers mailing list