summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorJagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>2017-01-20 13:54:37 +0530
committerJoe MacDonald <joe_macdonald@mentor.com>2017-02-22 08:31:58 -0500
commit0994337c9f263608ff4fd3d22a6eba3e0284ad8d (patch)
tree960f7a8235dd419b426e4e389035e0e13b7dcf3d /meta-networking
parent8e068c2022f3e3c27af31b6d400b6572f999ce75 (diff)
downloadmeta-openembedded-0994337c9f263608ff4fd3d22a6eba3e0284ad8d.tar.gz
iscsitarget: update patch to contain changes required to build with only linux v4.8 and above
1. Removes lines related "LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)", as they are included in recent build_with_updated_bio_struct_of_linux_v4.3_and_above.patch. 2. Updated incorrect "#if 0//LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)" line. 3. Updated patch to have in compliance with recent build_with_updated_bio_struct_of_linux_v4.3_and_above.patch. Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-extended/iscsitarget/files/build_with_updated_interfaces_of_linux_v4.8_and_above.patch96
1 files changed, 23 insertions, 73 deletions
diff --git a/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_interfaces_of_linux_v4.8_and_above.patch b/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_interfaces_of_linux_v4.8_and_above.patch
index e55c407a4..e508a5e6c 100644
--- a/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_interfaces_of_linux_v4.8_and_above.patch
+++ b/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_interfaces_of_linux_v4.8_and_above.patch
@@ -90,25 +90,9 @@ Upstream-Status: Pending
90Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> 90Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
91 91
92diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/block-io.c iscsitarget-1.4.20.3+svn502/kernel/block-io.c 92diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/block-io.c iscsitarget-1.4.20.3+svn502/kernel/block-io.c
93--- iscsitarget-1.4.20.3+svn502_org/kernel/block-io.c 2016-09-25 19:45:01.814641016 +0530 93--- iscsitarget-1.4.20.3+svn502_org/kernel/block-io.c 2017-01-19 20:19:27.400507354 -0800
94+++ iscsitarget-1.4.20.3+svn502/kernel/block-io.c 2016-09-25 19:47:59.666474094 +0530 94+++ iscsitarget-1.4.20.3+svn502/kernel/block-io.c 2017-01-19 20:32:22.977988593 -0800
95@@ -57,7 +57,6 @@ static int 95@@ -104,7 +104,11 @@ blockio_make_request(struct iet_volume *
96 blockio_make_request(struct iet_volume *volume, struct tio *tio, int rw)
97 {
98 struct blockio_data *bio_data = volume->private;
99- struct request_queue *bdev_q = bdev_get_queue(bio_data->bdev);
100 struct tio_work *tio_work;
101 struct bio *tio_bio = NULL, *bio = NULL, *biotail = NULL;
102 struct blk_plug plug;
103@@ -69,6 +68,7 @@ blockio_make_request(struct iet_volume *
104 int err = 0;
105 loff_t ppos = tio->offset;
106 #else
107+ struct request_queue *bdev_q = bdev_get_queue(bio_data->bdev);
108 int max_pages = 1;
109 int err = 0;
110
111@@ -102,7 +102,11 @@ blockio_make_request(struct iet_volume *
112 /* bi_sector is ALWAYS in units of 512 bytes */ 96 /* bi_sector is ALWAYS in units of 512 bytes */
113 bio->bi_iter.bi_sector = ppos >> 9; 97 bio->bi_iter.bi_sector = ppos >> 9;
114 bio->bi_bdev = bio_data->bdev; 98 bio->bi_bdev = bio_data->bdev;
@@ -120,7 +104,7 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/block-io.c iscsitarget-1.4.20
120 bio->bi_private = tio_work; 104 bio->bi_private = tio_work;
121 105
122 if (tio_bio) 106 if (tio_bio)
123@@ -137,7 +141,12 @@ blockio_make_request(struct iet_volume * 107@@ -139,7 +143,12 @@ blockio_make_request(struct iet_volume *
124 tio_bio = tio_bio->bi_next; 108 tio_bio = tio_bio->bi_next;
125 bio->bi_next = NULL; 109 bio->bi_next = NULL;
126 110
@@ -134,36 +118,14 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/block-io.c iscsitarget-1.4.20
134 118
135 blk_finish_plug(&plug); 119 blk_finish_plug(&plug);
136diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/conn.c iscsitarget-1.4.20.3+svn502/kernel/conn.c 120diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/conn.c iscsitarget-1.4.20.3+svn502/kernel/conn.c
137--- iscsitarget-1.4.20.3+svn502_org/kernel/conn.c 2016-09-25 19:45:01.774641057 +0530 121--- iscsitarget-1.4.20.3+svn502_org/kernel/conn.c 2017-01-19 20:19:27.400507354 -0800
138+++ iscsitarget-1.4.20.3+svn502/kernel/conn.c 2016-09-25 19:47:59.666474094 +0530 122+++ iscsitarget-1.4.20.3+svn502/kernel/conn.c 2017-01-19 20:32:22.978988614 -0800
139@@ -89,13 +89,21 @@ static void iet_state_change(struct sock 123@@ -148,8 +148,14 @@ static void iet_socket_bind(struct iscsi
140 target->nthread_info.old_state_change(sk);
141 }
142
143+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
144+static void iet_data_ready(struct sock *sk)
145+#else
146 static void iet_data_ready(struct sock *sk, int len)
147+#endif
148 {
149 struct iscsi_conn *conn = sk->sk_user_data;
150 struct iscsi_target *target = conn->session->target;
151
152 nthread_wakeup(target);
153+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
154+ target->nthread_info.old_data_ready(sk);
155+#else
156 target->nthread_info.old_data_ready(sk, len);
157+#endif
158 }
159
160 /*
161@@ -140,8 +148,14 @@ static void iet_socket_bind(struct iscsi
162 target->nthread_info.old_state_change = conn->sock->sk->sk_state_change; 124 target->nthread_info.old_state_change = conn->sock->sk->sk_state_change;
163 conn->sock->sk->sk_state_change = iet_state_change; 125 conn->sock->sk->sk_state_change = iet_state_change;
164 126
165+#if 0//LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) 127+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
166+ target->nthread_info.old_data_ready = (void (*) (struct sock *, int )) \ 128+ target->nthread_info.old_data_ready = (void (*) (struct sock *)) \
167+ conn->sock->sk->sk_data_ready; 129+ conn->sock->sk->sk_data_ready;
168+ conn->sock->sk->sk_data_ready = (void (*) (struct sock *)) iet_data_ready; 130+ conn->sock->sk->sk_data_ready = (void (*) (struct sock *)) iet_data_ready;
169+#else 131+#else
@@ -174,8 +136,8 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/conn.c iscsitarget-1.4.20.3+s
174 target->nthread_info.old_write_space = conn->sock->sk->sk_write_space; 136 target->nthread_info.old_write_space = conn->sock->sk->sk_write_space;
175 conn->sock->sk->sk_write_space = iet_write_space; 137 conn->sock->sk->sk_write_space = iet_write_space;
176diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/digest.c iscsitarget-1.4.20.3+svn502/kernel/digest.c 138diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/digest.c iscsitarget-1.4.20.3+svn502/kernel/digest.c
177--- iscsitarget-1.4.20.3+svn502_org/kernel/digest.c 2014-05-07 02:29:55.000000000 +0530 139--- iscsitarget-1.4.20.3+svn502_org/kernel/digest.c 2014-05-06 13:59:55.000000000 -0700
178+++ iscsitarget-1.4.20.3+svn502/kernel/digest.c 2016-09-25 19:47:59.666474094 +0530 140+++ iscsitarget-1.4.20.3+svn502/kernel/digest.c 2017-01-19 20:32:22.978988614 -0800
179@@ -30,6 +30,9 @@ void digest_alg_available(unsigned int * 141@@ -30,6 +30,9 @@ void digest_alg_available(unsigned int *
180 int digest_init(struct iscsi_conn *conn) 142 int digest_init(struct iscsi_conn *conn)
181 { 143 {
@@ -374,8 +336,8 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/digest.c iscsitarget-1.4.20.3
374+#endif 336+#endif
375 } 337 }
376diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/iscsi.h iscsitarget-1.4.20.3+svn502/kernel/iscsi.h 338diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/iscsi.h iscsitarget-1.4.20.3+svn502/kernel/iscsi.h
377--- iscsitarget-1.4.20.3+svn502_org/kernel/iscsi.h 2016-09-25 19:45:01.734641099 +0530 339--- iscsitarget-1.4.20.3+svn502_org/kernel/iscsi.h 2017-01-19 20:19:27.400507354 -0800
378+++ iscsitarget-1.4.20.3+svn502/kernel/iscsi.h 2016-09-25 19:47:59.666474094 +0530 340+++ iscsitarget-1.4.20.3+svn502/kernel/iscsi.h 2017-01-19 20:32:22.979988634 -0800
379@@ -14,6 +14,7 @@ 341@@ -14,6 +14,7 @@
380 #include <linux/pagemap.h> 342 #include <linux/pagemap.h>
381 #include <linux/seq_file.h> 343 #include <linux/seq_file.h>
@@ -384,19 +346,7 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/iscsi.h iscsitarget-1.4.20.3+
384 #include <linux/crypto.h> 346 #include <linux/crypto.h>
385 #include <linux/scatterlist.h> 347 #include <linux/scatterlist.h>
386 #include <net/sock.h> 348 #include <net/sock.h>
387@@ -81,7 +82,11 @@ struct network_thread_info { 349@@ -275,8 +276,13 @@ struct iscsi_conn {
388 spinlock_t nthread_lock;
389
390 void (*old_state_change)(struct sock *);
391+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
392+ void (*old_data_ready)(struct sock *);
393+#else
394 void (*old_data_ready)(struct sock *, int);
395+#endif
396 void (*old_write_space)(struct sock *);
397 };
398
399@@ -275,8 +280,13 @@ struct iscsi_conn {
400 u32 write_offset; 350 u32 write_offset;
401 int write_state; 351 int write_state;
402 352
@@ -410,7 +360,7 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/iscsi.h iscsitarget-1.4.20.3+
410 struct scatterlist hash_sg[ISCSI_CONN_IOV_MAX]; 360 struct scatterlist hash_sg[ISCSI_CONN_IOV_MAX];
411 }; 361 };
412 362
413@@ -552,4 +562,10 @@ enum cmnd_flags { 363@@ -552,4 +558,10 @@ enum cmnd_flags {
414 #define PRODUCT_ID "VIRTUAL-DISK" 364 #define PRODUCT_ID "VIRTUAL-DISK"
415 #define PRODUCT_REV "0" 365 #define PRODUCT_REV "0"
416 366
@@ -422,9 +372,9 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/iscsi.h iscsitarget-1.4.20.3+
422+ 372+
423 #endif /* __ISCSI_H__ */ 373 #endif /* __ISCSI_H__ */
424diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/nthread.c iscsitarget-1.4.20.3+svn502/kernel/nthread.c 374diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/nthread.c iscsitarget-1.4.20.3+svn502/kernel/nthread.c
425--- iscsitarget-1.4.20.3+svn502_org/kernel/nthread.c 2016-09-25 19:45:01.734641099 +0530 375--- iscsitarget-1.4.20.3+svn502_org/kernel/nthread.c 2017-01-19 20:19:27.276504928 -0800
426+++ iscsitarget-1.4.20.3+svn502/kernel/nthread.c 2016-09-25 19:47:59.666474094 +0530 376+++ iscsitarget-1.4.20.3+svn502/kernel/nthread.c 2017-01-19 20:32:22.979988634 -0800
427@@ -126,7 +126,12 @@ static int do_recv(struct iscsi_conn *co 377@@ -155,7 +155,12 @@ static int do_recv(struct iscsi_conn *co
428 378
429 oldfs = get_fs(); 379 oldfs = get_fs();
430 set_fs(get_ds()); 380 set_fs(get_ds());
@@ -437,7 +387,7 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/nthread.c iscsitarget-1.4.20.
437 set_fs(oldfs); 387 set_fs(oldfs);
438 388
439 if (res <= 0) { 389 if (res <= 0) {
440@@ -347,7 +352,11 @@ static int write_data(struct iscsi_conn 390@@ -376,7 +381,11 @@ static int write_data(struct iscsi_conn
441 ; 391 ;
442 oldfs = get_fs(); 392 oldfs = get_fs();
443 set_fs(KERNEL_DS); 393 set_fs(KERNEL_DS);
@@ -449,7 +399,7 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/nthread.c iscsitarget-1.4.20.
449 set_fs(oldfs); 399 set_fs(oldfs);
450 dprintk(D_DATA, "%#Lx:%u: %d(%ld)\n", 400 dprintk(D_DATA, "%#Lx:%u: %d(%ld)\n",
451 (unsigned long long) conn->session->sid, conn->cid, 401 (unsigned long long) conn->session->sid, conn->cid,
452@@ -478,7 +487,11 @@ static int tx_ddigest(struct iscsi_cmnd 402@@ -503,7 +512,11 @@ static int tx_ddigest(struct iscsi_cmnd
453 iov.iov_base = (char *) (&cmnd->ddigest) + (sizeof(u32) - rest); 403 iov.iov_base = (char *) (&cmnd->ddigest) + (sizeof(u32) - rest);
454 iov.iov_len = rest; 404 iov.iov_len = rest;
455 405
@@ -461,7 +411,7 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/nthread.c iscsitarget-1.4.20.
461 411
462 if (res > 0) { 412 if (res > 0) {
463 cmnd->conn->write_size -= res; 413 cmnd->conn->write_size -= res;
464@@ -677,7 +690,12 @@ static void close_conn(struct iscsi_conn 414@@ -702,7 +715,12 @@ static void close_conn(struct iscsi_conn
465 415
466 write_lock_bh(&conn->sock->sk->sk_callback_lock); 416 write_lock_bh(&conn->sock->sk->sk_callback_lock);
467 conn->sock->sk->sk_state_change = target->nthread_info.old_state_change; 417 conn->sock->sk->sk_state_change = target->nthread_info.old_state_change;
@@ -475,8 +425,8 @@ diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/nthread.c iscsitarget-1.4.20.
475 write_unlock_bh(&conn->sock->sk->sk_callback_lock); 425 write_unlock_bh(&conn->sock->sk->sk_callback_lock);
476 426
477diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/volume.c iscsitarget-1.4.20.3+svn502/kernel/volume.c 427diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/volume.c iscsitarget-1.4.20.3+svn502/kernel/volume.c
478--- iscsitarget-1.4.20.3+svn502_org/kernel/volume.c 2016-09-25 19:45:01.734641099 +0530 428--- iscsitarget-1.4.20.3+svn502_org/kernel/volume.c 2017-01-19 20:19:27.276504928 -0800
479+++ iscsitarget-1.4.20.3+svn502/kernel/volume.c 2016-09-25 19:47:59.666474094 +0530 429+++ iscsitarget-1.4.20.3+svn502/kernel/volume.c 2017-01-19 20:32:22.979988634 -0800
480@@ -84,12 +84,25 @@ static int set_scsisn(struct iet_volume 430@@ -84,12 +84,25 @@ static int set_scsisn(struct iet_volume
481 /* Generate a MD5 hash of the target IQN and LUN number */ 431 /* Generate a MD5 hash of the target IQN and LUN number */
482 static void gen_scsiid(struct iet_volume *volume) 432 static void gen_scsiid(struct iet_volume *volume)