~ubuntu-branches/ubuntu/trusty/iscsitarget/trusty

« back to all changes in this revision

Viewing changes to patches/compat-2.6.14-2.6.18.patch

  • Committer: Colin Watson
  • Date: 2010-08-16 20:59:52 UTC
  • mfrom: (2.1.9 sid)
  • Revision ID: cjwatson@canonical.com-20100816205952-hyytf817ju6wk1bj
merge from Debian 1.4.20.2-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
===================================================================
3
3
--- 1/kernel/iscsi.h    (revision 105)
4
4
+++ 2/kernel/iscsi.h    (working copy)
5
 
@@ -254,8 +254,8 @@ struct iscsi_conn {
 
5
@@ -261,8 +261,8 @@ struct iscsi_conn {
6
6
        u32 write_offset;
7
7
        int write_state;
8
8
 
173
173
+       digest_data(cmnd->conn->tx_digest_tfm, cmnd, tio,
174
174
                    be32_to_cpu(req->buffer_offset), (u8 *) &cmnd->ddigest);
175
175
 }
176
 
Index: kernel/file-io.c
177
 
===================================================================
178
 
--- 1/kernel/file-io.c  (revision 105)
179
 
+++ 2/kernel/file-io.c  (working copy)
180
 
@@ -53,9 +53,9 @@ static int fileio_make_request(struct ie
181
 
                set_fs(get_ds());
182
 
 
183
 
                if (rw == READ)
184
 
-                       ret = do_sync_read(filp, buf, count, &ppos);
185
 
+                       ret = generic_file_read(filp, buf, count, &ppos);
186
 
                else
187
 
-                       ret = do_sync_write(filp, buf, count, &ppos);
188
 
+                       ret = generic_file_write(filp, buf, count, &ppos);
189
 
 
190
 
                set_fs(oldfs);
191
 
 
192
176
Index: kernel/iscsi.c
193
177
===================================================================
194
178
--- 1/kernel/iscsi.c    (revision 105)
195
179
+++ 2/kernel/iscsi.c    (working copy)
196
 
@@ -16,7 +16,7 @@
 
180
@@ -17,7 +17,7 @@
197
181
 unsigned long debug_enable_flags;
198
182
 unsigned long worker_thread_pool_size;
199
183
 
215
199
 
216
200
 struct tio *tio_alloc(int count)
217
201
 {
 
202
--- context/kernel/wthread.c    2010-01-25 11:27:57.000000000 -0500
 
203
+++ context/kernel/wthread.c.18 2010-01-25 11:25:43.000000000 -0500
 
204
@@ -67,7 +67,7 @@
 
205
        struct iscsi_conn *conn;
 
206
        DECLARE_WAITQUEUE(wait, current);
 
207
 
 
208
-       get_io_context(GFP_KERNEL, -1);
 
209
+       get_io_context(GFP_KERNEL);
 
210
 
 
211
        if (!current->io_context)
 
212
                eprintk("%s\n", "Failed to get IO context");
 
213
--- param/kernel/volume.c       2010-04-08 18:05:38.000000000 -0400
 
214
+++ param/kernel/volume.c.18    2010-04-08 18:05:38.000000000 -0400
 
215
@@ -84,28 +84,26 @@ static int set_scsisn(struct iet_volume 
 
216
 /* Generate a MD5 hash of the target IQN and LUN number */
 
217
 static void gen_scsiid(struct iet_volume *volume)
 
218
 {
 
219
-       struct hash_desc hash;
 
220
+       struct crypto_tfm *tfm;
 
221
 
 
222
-       hash.tfm = crypto_alloc_hash("md5", 0, CRYPTO_ALG_ASYNC);
 
223
-       hash.flags = 0;
 
224
+       tfm = crypto_alloc_tfm("md5", 0);
 
225
 
 
226
-       if (hash.tfm) {
 
227
+       if (tfm) {
 
228
                struct scatterlist sg[2];
 
229
-               unsigned int nbytes = 0;
 
230
 
 
231
                sg[0].page = virt_to_page(volume->target->name);
 
232
                sg[0].offset = offset_in_page(volume->target->name);
 
233
-               nbytes += sg[0].length = strlen(volume->target->name);
 
234
+               sg[0].length = strlen(volume->target->name);
 
235
 
 
236
                sg[1].page = virt_to_page(&volume->lun);
 
237
                sg[1].offset = offset_in_page(&volume->lun);
 
238
-               nbytes += sg[1].length = sizeof(volume->lun);
 
239
+               sg[1].length = sizeof(volume->lun);
 
240
 
 
241
-               crypto_hash_init(&hash);
 
242
-               crypto_hash_update(&hash, sg, nbytes);
 
243
-               crypto_hash_final(&hash, volume->scsi_id);
 
244
+               crypto_digest_init(tfm);
 
245
+               crypto_digest_update(tfm, sg, 2);
 
246
+               crypto_digest_final(tfm, volume->scsi_id);
 
247
 
 
248
-               crypto_free_hash(hash.tfm);
 
249
+               crypto_free_tfm(tfm);
 
250
        } else {
 
251
                /* If no MD5 available set ID to TID and LUN */
 
252
                memcpy(volume->scsi_id, &volume->target->tid,