[Pkg-iscsi-maintainers] [iscsitarget] 03/07: Imported Upstream version 1.4.20.3+svn502

Ritesh Raj Sarraf rrs at moszumanska.debian.org
Thu May 8 13:15:54 UTC 2014


This is an automated email from the git hooks/post-receive script.

rrs pushed a commit to branch master
in repository iscsitarget.

commit f81dcecf8cdce10f190c702d1fba8aa9bd477933
Author: Ritesh Raj Sarraf <rrs at debian.org>
Date:   Thu May 8 17:24:59 2014 +0530

    Imported Upstream version 1.4.20.3+svn502
---
 Makefile                  |  4 ++++
 kernel/block-io.c         |  2 +-
 kernel/conn.c             |  4 ++--
 kernel/iscsi.c            | 12 ++++++------
 kernel/nthread.c          |  4 ++--
 patches/compat-3.13.patch | 28 ++++++++++++++++++++++++++++
 6 files changed, 43 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 78d0596..fc7de9a 100644
--- a/Makefile
+++ b/Makefile
@@ -66,6 +66,10 @@ kver_lk = $(shell [ `echo $(KVER) | egrep $(1)` ] && echo 1 || echo 0)
 # base first the earlier patch sets will not need to be modified.
 #
 
+ifeq ($(call kver_lt,3,14,0),1)
+	PATCHES := $(PATCHES) compat-3.13.patch
+endif
+
 ifeq ($(call kver_lt,3,13,0),1)
 	PATCHES := $(PATCHES) compat-3.12.patch
 endif
diff --git a/kernel/block-io.c b/kernel/block-io.c
index 7c9ea21..00365b5 100644
--- a/kernel/block-io.c
+++ b/kernel/block-io.c
@@ -87,7 +87,7 @@ blockio_make_request(struct iet_volume *volume, struct tio *tio, int rw)
 		}
 
 		/* bi_sector is ALWAYS in units of 512 bytes */
-		bio->bi_sector = ppos >> 9;
+		bio->bi_iter.bi_sector = ppos >> 9;
 		bio->bi_bdev = bio_data->bdev;
 		bio->bi_end_io = blockio_bio_endio;
 		bio->bi_private = tio_work;
diff --git a/kernel/conn.c b/kernel/conn.c
index 3740557..5c39adb 100644
--- a/kernel/conn.c
+++ b/kernel/conn.c
@@ -218,7 +218,7 @@ void conn_close(struct iscsi_conn *conn)
 	if (test_and_clear_bit(CONN_ACTIVE, &conn->state))
 		set_bit(CONN_CLOSING, &conn->state);
 
-	spin_lock(&conn->list_lock);
+	spin_lock_bh(&conn->list_lock);
 	list_for_each_entry(cmnd, &conn->pdu_list, conn_list) {
 		set_cmnd_tmfabort(cmnd);
 		if (cmnd->lun) {
@@ -226,7 +226,7 @@ void conn_close(struct iscsi_conn *conn)
 			iscsi_cmnd_set_sense(cmnd, UNIT_ATTENTION, 0x6e, 0x0);
 		}
 	}
-	spin_unlock(&conn->list_lock);
+	spin_unlock_bh(&conn->list_lock);
 
 	nthread_wakeup(conn->session->target);
 }
diff --git a/kernel/iscsi.c b/kernel/iscsi.c
index 9ad3047..6ce74b5 100644
--- a/kernel/iscsi.c
+++ b/kernel/iscsi.c
@@ -159,11 +159,11 @@ struct iscsi_cmnd *cmnd_alloc(struct iscsi_conn *conn, int req)
 	INIT_LIST_HEAD(&cmnd->conn_list);
 	INIT_LIST_HEAD(&cmnd->hash_list);
 	cmnd->conn = conn;
-	spin_lock(&conn->list_lock);
+	spin_lock_bh(&conn->list_lock);
 	atomic_inc(&conn->nr_cmnds);
 	if (req)
 		list_add_tail(&cmnd->conn_list, &conn->pdu_list);
-	spin_unlock(&conn->list_lock);
+	spin_unlock_bh(&conn->list_lock);
 	cmnd->tio = NULL;
 
 	dprintk(D_GENERIC, "%p:%p\n", conn, cmnd);
@@ -202,7 +202,7 @@ static void iscsi_cmnds_init_write(struct list_head *send)
 	struct iscsi_conn *conn = cmnd->conn;
 	struct list_head *pos, *next;
 
-	spin_lock(&conn->list_lock);
+	spin_lock_bh(&conn->list_lock);
 
 	list_for_each_safe(pos, next, send) {
 		cmnd = list_entry(pos, struct iscsi_cmnd, list);
@@ -214,7 +214,7 @@ static void iscsi_cmnds_init_write(struct list_head *send)
 		list_add_tail(&cmnd->list, &conn->write_list);
 	}
 
-	spin_unlock(&conn->list_lock);
+	spin_unlock_bh(&conn->list_lock);
 
 	nthread_wakeup(conn->session->target);
 }
@@ -448,10 +448,10 @@ static void iscsi_cmnd_remove(struct iscsi_cmnd *cmnd)
 		BUG();
 	}
 	list_del(&cmnd->list);
-	spin_lock(&conn->list_lock);
+	spin_lock_bh(&conn->list_lock);
 	atomic_dec(&conn->nr_cmnds);
 	list_del(&cmnd->conn_list);
-	spin_unlock(&conn->list_lock);
+	spin_unlock_bh(&conn->list_lock);
 
 	if (cmnd->tio)
 		tio_put(cmnd->tio);
diff --git a/kernel/nthread.c b/kernel/nthread.c
index db19544..20db2c5 100644
--- a/kernel/nthread.c
+++ b/kernel/nthread.c
@@ -58,12 +58,12 @@ static struct iscsi_cmnd * iscsi_get_send_cmnd(struct iscsi_conn *conn)
 {
 	struct iscsi_cmnd *cmnd = NULL;
 
-	spin_lock(&conn->list_lock);
+	spin_lock_bh(&conn->list_lock);
 	if (!list_empty(&conn->write_list)) {
 		cmnd = list_entry(conn->write_list.next, struct iscsi_cmnd, list);
 		list_del_init(&cmnd->list);
 	}
-	spin_unlock(&conn->list_lock);
+	spin_unlock_bh(&conn->list_lock);
 
 	return cmnd;
 }
diff --git a/patches/compat-3.13.patch b/patches/compat-3.13.patch
new file mode 100644
index 0000000..f6e7ead
--- /dev/null
+++ b/patches/compat-3.13.patch
@@ -0,0 +1,28 @@
+diff --git b/Makefile a/Makefile
+index fc7de9a..78d0596 100644
+--- b/Makefile
++++ a/Makefile
+@@ -66,10 +66,6 @@ kver_lk = $(shell [ `echo $(KVER) | egrep $(1)` ] && echo 1 || echo 0)
+ # base first the earlier patch sets will not need to be modified.
+ #
+ 
+-ifeq ($(call kver_lt,3,14,0),1)
+-	PATCHES := $(PATCHES) compat-3.13.patch
+-endif
+-
+ ifeq ($(call kver_lt,3,13,0),1)
+ 	PATCHES := $(PATCHES) compat-3.12.patch
+ endif
+diff --git b/kernel/block-io.c a/kernel/block-io.c
+index 00365b5..7c9ea21 100644
+--- b/kernel/block-io.c
++++ a/kernel/block-io.c
+@@ -87,7 +87,7 @@ blockio_make_request(struct iet_volume *volume, struct tio *tio, int rw)
+ 		}
+ 
+ 		/* bi_sector is ALWAYS in units of 512 bytes */
+-		bio->bi_iter.bi_sector = ppos >> 9;
++		bio->bi_sector = ppos >> 9;
+ 		bio->bi_bdev = bio_data->bdev;
+ 		bio->bi_end_io = blockio_bio_endio;
+ 		bio->bi_private = tio_work;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-iscsi/iscsitarget.git



More information about the Pkg-iscsi-maintainers mailing list