[packages/kernel/LINUX_3_10] - updated from origin to latest version
lkrotowski
lkrotowski at pld-linux.org
Tue Nov 19 15:32:03 CET 2013
commit 39348b5ea9115f07d054150751054c7bab0eda32
Author: Łukasz Krotowski <lkrotowski at pld-linux.org>
Date: Tue Nov 19 15:31:04 2013 +0100
- updated from origin to latest version
dm-crypt-dont-allocate-partial-pages.patch | 27 ++++++++++++++-------------
dm-crypt-fix-allocation-deadlock.patch | 10 +++++-----
dm-crypt-offload-writes-to-thread.patch | 20 ++++++++++----------
dm-crypt-remove-percpu.patch | 18 +++++++++---------
dm-crypt-sort-requests.patch | 18 +++++++++---------
dm-crypt-unbound-workqueue.patch | 8 ++++----
6 files changed, 51 insertions(+), 50 deletions(-)
---
diff --git a/dm-crypt-dont-allocate-partial-pages.patch b/dm-crypt-dont-allocate-partial-pages.patch
index 8354ab8..b14bc22 100644
--- a/dm-crypt-dont-allocate-partial-pages.patch
+++ b/dm-crypt-dont-allocate-partial-pages.patch
@@ -11,13 +11,13 @@ Note: the next patch is needed to fix a theoretical deadlock
Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
---
- drivers/md/dm-crypt.c | 133 +++++++++-----------------------------------------
- 1 file changed, 25 insertions(+), 108 deletions(-)
+ drivers/md/dm-crypt.c | 134 +++++++++-----------------------------------------
+ 1 file changed, 26 insertions(+), 108 deletions(-)
-Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
+Index: linux-3.10.4-fast/drivers/md/dm-crypt.c
===================================================================
---- linux-3.9.2-fast.orig/drivers/md/dm-crypt.c 2013-05-15 21:47:30.000000000 +0200
-+++ linux-3.9.2-fast/drivers/md/dm-crypt.c 2013-05-15 22:49:13.000000000 +0200
+--- linux-3.10.4-fast.orig/drivers/md/dm-crypt.c 2013-07-31 17:03:18.000000000 +0200
++++ linux-3.10.4-fast/drivers/md/dm-crypt.c 2013-07-31 17:03:21.000000000 +0200
@@ -59,7 +59,6 @@ struct dm_crypt_io {
atomic_t io_pending;
int error;
@@ -52,7 +52,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
{
struct crypt_config *cc = io->cc;
struct bio *clone;
-@@ -798,37 +795,22 @@ static struct bio *crypt_alloc_buffer(st
+@@ -798,37 +795,23 @@ static struct bio *crypt_alloc_buffer(st
return NULL;
clone_init(io, clone);
@@ -75,6 +75,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
len = (size > PAGE_SIZE) ? PAGE_SIZE : size;
if (!bio_add_page(clone, page, len, 0)) {
++ DMERR("bio_add_page failed for page %d: the underlying device has stricter limits than dm-crypt target", i);
mempool_free(page, cc->page_pool);
- break;
+ crypt_free_buffer_pages(cc, clone);
@@ -93,7 +94,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
return clone;
}
-@@ -855,7 +837,6 @@ static struct dm_crypt_io *crypt_io_allo
+@@ -854,7 +837,6 @@ static struct dm_crypt_io *crypt_io_allo
io->base_bio = bio;
io->sector = sector;
io->error = 0;
@@ -101,7 +102,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
io->ctx.req = NULL;
atomic_set(&io->io_pending, 0);
-@@ -870,13 +851,11 @@ static void crypt_inc_pending(struct dm_
+@@ -869,13 +851,11 @@ static void crypt_inc_pending(struct dm_
/*
* One of the bios was finished. Check for completion of
* the whole request and correctly clean up the buffer.
@@ -115,7 +116,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
int error = io->error;
if (!atomic_dec_and_test(&io->io_pending))
-@@ -886,13 +865,7 @@ static void crypt_dec_pending(struct dm_
+@@ -885,13 +865,7 @@ static void crypt_dec_pending(struct dm_
mempool_free(io->ctx.req, cc->req_pool);
mempool_free(io, cc->io_pool);
@@ -130,7 +131,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
}
/*
-@@ -1030,10 +1003,7 @@ static void kcryptd_crypt_write_convert(
+@@ -1027,10 +1001,7 @@ static void kcryptd_crypt_write_convert(
{
struct crypt_config *cc = io->cc;
struct bio *clone;
@@ -141,7 +142,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
sector_t sector = io->sector;
int r;
-@@ -1043,81 +1013,28 @@ static void kcryptd_crypt_write_convert(
+@@ -1040,81 +1011,28 @@ static void kcryptd_crypt_write_convert(
crypt_inc_pending(io);
crypt_convert_init(cc, &io->ctx, NULL, io->base_bio, sector);
@@ -182,7 +183,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
- break;
+ clone = crypt_alloc_buffer(io, io->base_bio->bi_size);
+ if (unlikely(!clone)) {
-+ io->error = -ENOMEM;
++ io->error = -EIO;
+ goto dec;
+ }
@@ -240,7 +241,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
crypt_dec_pending(io);
}
-@@ -1556,7 +1473,7 @@ static int crypt_ctr(struct dm_target *t
+@@ -1553,7 +1471,7 @@ static int crypt_ctr(struct dm_target *t
goto bad;
}
diff --git a/dm-crypt-fix-allocation-deadlock.patch b/dm-crypt-fix-allocation-deadlock.patch
index 8f439da..9971e09 100644
--- a/dm-crypt-fix-allocation-deadlock.patch
+++ b/dm-crypt-fix-allocation-deadlock.patch
@@ -20,10 +20,10 @@ Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
drivers/md/dm-crypt.c | 36 +++++++++++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)
-Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
+Index: linux-3.10.4-fast/drivers/md/dm-crypt.c
===================================================================
---- linux-3.9.2-fast.orig/drivers/md/dm-crypt.c 2013-05-15 22:49:13.000000000 +0200
-+++ linux-3.9.2-fast/drivers/md/dm-crypt.c 2013-05-15 22:49:53.000000000 +0200
+--- linux-3.10.4-fast.orig/drivers/md/dm-crypt.c 2013-07-31 17:03:21.000000000 +0200
++++ linux-3.10.4-fast/drivers/md/dm-crypt.c 2013-07-31 17:03:24.000000000 +0200
@@ -118,6 +118,7 @@ struct crypt_config {
mempool_t *req_pool;
mempool_t *page_pool;
@@ -81,7 +81,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
len = (size > PAGE_SIZE) ? PAGE_SIZE : size;
-@@ -805,12 +828,17 @@ static struct bio *crypt_alloc_buffer(st
+@@ -806,12 +829,17 @@ static struct bio *crypt_alloc_buffer(st
mempool_free(page, cc->page_pool);
crypt_free_buffer_pages(cc, clone);
bio_put(clone);
@@ -100,7 +100,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
return clone;
}
-@@ -1485,6 +1513,8 @@ static int crypt_ctr(struct dm_target *t
+@@ -1483,6 +1511,8 @@ static int crypt_ctr(struct dm_target *t
goto bad;
}
diff --git a/dm-crypt-offload-writes-to-thread.patch b/dm-crypt-offload-writes-to-thread.patch
index da2e68f..2fe475c 100644
--- a/dm-crypt-offload-writes-to-thread.patch
+++ b/dm-crypt-offload-writes-to-thread.patch
@@ -21,10 +21,10 @@ Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
drivers/md/dm-crypt.c | 120 ++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 97 insertions(+), 23 deletions(-)
-Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
+Index: linux-3.10.4-fast/drivers/md/dm-crypt.c
===================================================================
---- linux-3.9.2-fast.orig/drivers/md/dm-crypt.c 2013-05-15 22:49:53.000000000 +0200
-+++ linux-3.9.2-fast/drivers/md/dm-crypt.c 2013-05-15 22:49:57.000000000 +0200
+--- linux-3.10.4-fast.orig/drivers/md/dm-crypt.c 2013-07-31 17:03:24.000000000 +0200
++++ linux-3.10.4-fast/drivers/md/dm-crypt.c 2013-07-31 17:03:27.000000000 +0200
@@ -17,6 +17,7 @@
#include <linux/slab.h>
#include <linux/crypto.h>
@@ -53,7 +53,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
char *cipher;
char *cipher_string;
-@@ -977,37 +984,89 @@ static int kcryptd_io_read(struct dm_cry
+@@ -975,37 +982,89 @@ static int kcryptd_io_read(struct dm_cry
return 0;
}
@@ -159,7 +159,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
if (unlikely(io->error < 0)) {
crypt_free_buffer_pages(cc, clone);
-@@ -1021,10 +1080,10 @@ static void kcryptd_crypt_write_io_submi
+@@ -1019,10 +1078,10 @@ static void kcryptd_crypt_write_io_submi
clone->bi_sector = cc->start + io->sector;
@@ -174,7 +174,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
}
static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
-@@ -1060,7 +1119,7 @@ static void kcryptd_crypt_write_convert(
+@@ -1058,7 +1117,7 @@ static void kcryptd_crypt_write_convert(
/* Encryption was already finished, submit io now */
if (crypt_finished)
@@ -183,7 +183,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
dec:
crypt_dec_pending(io);
-@@ -1118,7 +1177,7 @@ static void kcryptd_async_done(struct cr
+@@ -1116,7 +1175,7 @@ static void kcryptd_async_done(struct cr
if (bio_data_dir(io->base_bio) == READ)
kcryptd_crypt_read_done(io);
else
@@ -192,7 +192,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
}
static void kcryptd_crypt(struct work_struct *work)
-@@ -1262,6 +1321,9 @@ static void crypt_dtr(struct dm_target *
+@@ -1260,6 +1319,9 @@ static void crypt_dtr(struct dm_target *
if (!cc)
return;
@@ -202,7 +202,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
if (cc->io_queue)
destroy_workqueue(cc->io_queue);
if (cc->crypt_queue)
-@@ -1578,6 +1640,18 @@ static int crypt_ctr(struct dm_target *t
+@@ -1576,6 +1638,18 @@ static int crypt_ctr(struct dm_target *t
goto bad;
}
@@ -221,7 +221,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
ti->num_flush_bios = 1;
ti->discard_zeroes_data_unsupported = true;
-@@ -1611,7 +1685,7 @@ static int crypt_map(struct dm_target *t
+@@ -1607,7 +1681,7 @@ static int crypt_map(struct dm_target *t
if (bio_data_dir(io->base_bio) == READ) {
if (kcryptd_io_read(io, GFP_NOWAIT))
diff --git a/dm-crypt-remove-percpu.patch b/dm-crypt-remove-percpu.patch
index 2467276..d08a506 100644
--- a/dm-crypt-remove-percpu.patch
+++ b/dm-crypt-remove-percpu.patch
@@ -9,10 +9,10 @@ Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
drivers/md/dm-crypt.c | 61 +++++++++-----------------------------------------
1 file changed, 12 insertions(+), 49 deletions(-)
-Index: linux-3.8.6-fast/drivers/md/dm-crypt.c
+Index: linux-3.10.4-fast/drivers/md/dm-crypt.c
===================================================================
---- linux-3.8.6-fast.orig/drivers/md/dm-crypt.c 2013-04-11 17:29:10.000000000 +0200
-+++ linux-3.8.6-fast/drivers/md/dm-crypt.c 2013-04-11 17:29:10.000000000 +0200
+--- linux-3.10.4-fast.orig/drivers/md/dm-crypt.c 2013-07-31 16:59:48.000000000 +0200
++++ linux-3.10.4-fast/drivers/md/dm-crypt.c 2013-07-31 17:03:10.000000000 +0200
@@ -18,7 +18,6 @@
#include <linux/crypto.h>
#include <linux/workqueue.h>
@@ -119,7 +119,7 @@ Index: linux-3.8.6-fast/drivers/md/dm-crypt.c
ctx->cc_sector++;
continue;
-@@ -877,6 +856,7 @@ static struct dm_crypt_io *crypt_io_allo
+@@ -876,6 +855,7 @@ static struct dm_crypt_io *crypt_io_allo
io->sector = sector;
io->error = 0;
io->base_io = NULL;
@@ -127,7 +127,7 @@ Index: linux-3.8.6-fast/drivers/md/dm-crypt.c
atomic_set(&io->io_pending, 0);
return io;
-@@ -902,6 +882,8 @@ static void crypt_dec_pending(struct dm_
+@@ -901,6 +881,8 @@ static void crypt_dec_pending(struct dm_
if (!atomic_dec_and_test(&io->io_pending))
return;
@@ -136,7 +136,7 @@ Index: linux-3.8.6-fast/drivers/md/dm-crypt.c
mempool_free(io, cc->io_pool);
if (likely(!base_io))
-@@ -1329,8 +1311,6 @@ static int crypt_wipe_key(struct crypt_c
+@@ -1326,8 +1308,6 @@ static int crypt_wipe_key(struct crypt_c
static void crypt_dtr(struct dm_target *ti)
{
struct crypt_config *cc = ti->private;
@@ -145,7 +145,7 @@ Index: linux-3.8.6-fast/drivers/md/dm-crypt.c
ti->private = NULL;
-@@ -1342,13 +1322,6 @@ static void crypt_dtr(struct dm_target *
+@@ -1339,13 +1319,6 @@ static void crypt_dtr(struct dm_target *
if (cc->crypt_queue)
destroy_workqueue(cc->crypt_queue);
@@ -159,7 +159,7 @@ Index: linux-3.8.6-fast/drivers/md/dm-crypt.c
crypt_free_tfms(cc);
if (cc->bs)
-@@ -1367,9 +1340,6 @@ static void crypt_dtr(struct dm_target *
+@@ -1364,9 +1337,6 @@ static void crypt_dtr(struct dm_target *
if (cc->dev)
dm_put_device(ti, cc->dev);
@@ -169,7 +169,7 @@ Index: linux-3.8.6-fast/drivers/md/dm-crypt.c
kzfree(cc->cipher);
kzfree(cc->cipher_string);
-@@ -1424,13 +1394,6 @@ static int crypt_ctr_cipher(struct dm_ta
+@@ -1421,13 +1391,6 @@ static int crypt_ctr_cipher(struct dm_ta
if (tmp)
DMWARN("Ignoring unexpected additional cipher options");
diff --git a/dm-crypt-sort-requests.patch b/dm-crypt-sort-requests.patch
index 90bfbae..8ee2da7 100644
--- a/dm-crypt-sort-requests.patch
+++ b/dm-crypt-sort-requests.patch
@@ -13,10 +13,10 @@ Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
drivers/md/dm-crypt.c | 50 +++++++++++++++++++++++++++++++++++---------------
1 file changed, 35 insertions(+), 15 deletions(-)
-Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
+Index: linux-3.10.4-fast/drivers/md/dm-crypt.c
===================================================================
---- linux-3.9.2-fast.orig/drivers/md/dm-crypt.c 2013-05-15 22:49:57.000000000 +0200
-+++ linux-3.9.2-fast/drivers/md/dm-crypt.c 2013-05-15 22:50:01.000000000 +0200
+--- linux-3.10.4-fast.orig/drivers/md/dm-crypt.c 2013-07-31 17:03:27.000000000 +0200
++++ linux-3.10.4-fast/drivers/md/dm-crypt.c 2013-07-31 17:03:30.000000000 +0200
@@ -21,6 +21,7 @@
#include <linux/backing-dev.h>
#include <linux/atomic.h>
@@ -43,7 +43,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
char *cipher;
char *cipher_string;
-@@ -1013,7 +1014,7 @@ static int dmcrypt_write(void *data)
+@@ -1011,7 +1012,7 @@ static int dmcrypt_write(void *data)
{
struct crypt_config *cc = data;
while (1) {
@@ -52,7 +52,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
struct blk_plug plug;
DECLARE_WAITQUEUE(wait, current);
-@@ -1021,7 +1022,7 @@ static int dmcrypt_write(void *data)
+@@ -1019,7 +1020,7 @@ static int dmcrypt_write(void *data)
spin_lock_irq(&cc->write_thread_wait.lock);
continue_locked:
@@ -61,7 +61,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
goto pop_from_list;
__set_current_state(TASK_INTERRUPTIBLE);
-@@ -1043,20 +1044,23 @@ continue_locked:
+@@ -1041,20 +1042,23 @@ continue_locked:
goto continue_locked;
pop_from_list:
@@ -94,7 +94,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
blk_finish_plug(&plug);
}
return 0;
-@@ -1067,6 +1071,8 @@ static void kcryptd_crypt_write_io_submi
+@@ -1065,6 +1069,8 @@ static void kcryptd_crypt_write_io_submi
struct bio *clone = io->ctx.bio_out;
struct crypt_config *cc = io->cc;
unsigned long flags;
@@ -103,7 +103,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
if (unlikely(io->error < 0)) {
crypt_free_buffer_pages(cc, clone);
-@@ -1081,7 +1087,21 @@ static void kcryptd_crypt_write_io_submi
+@@ -1079,7 +1085,21 @@ static void kcryptd_crypt_write_io_submi
clone->bi_sector = cc->start + io->sector;
spin_lock_irqsave(&cc->write_thread_wait.lock, flags);
@@ -126,7 +126,7 @@ Index: linux-3.9.2-fast/drivers/md/dm-crypt.c
wake_up_locked(&cc->write_thread_wait);
spin_unlock_irqrestore(&cc->write_thread_wait.lock, flags);
}
-@@ -1641,7 +1661,7 @@ static int crypt_ctr(struct dm_target *t
+@@ -1639,7 +1659,7 @@ static int crypt_ctr(struct dm_target *t
}
init_waitqueue_head(&cc->write_thread_wait);
diff --git a/dm-crypt-unbound-workqueue.patch b/dm-crypt-unbound-workqueue.patch
index 0433569..3cbea93 100644
--- a/dm-crypt-unbound-workqueue.patch
+++ b/dm-crypt-unbound-workqueue.patch
@@ -9,11 +9,11 @@ Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
drivers/md/dm-crypt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
-Index: linux-3.8.6-fast/drivers/md/dm-crypt.c
+Index: linux-3.10.4-fast/drivers/md/dm-crypt.c
===================================================================
---- linux-3.8.6-fast.orig/drivers/md/dm-crypt.c 2013-04-11 17:29:10.000000000 +0200
-+++ linux-3.8.6-fast/drivers/md/dm-crypt.c 2013-04-11 17:29:13.000000000 +0200
-@@ -1623,8 +1623,9 @@ static int crypt_ctr(struct dm_target *t
+--- linux-3.10.4-fast.orig/drivers/md/dm-crypt.c 2013-07-31 17:03:10.000000000 +0200
++++ linux-3.10.4-fast/drivers/md/dm-crypt.c 2013-07-31 17:03:18.000000000 +0200
+@@ -1620,8 +1620,9 @@ static int crypt_ctr(struct dm_target *t
cc->crypt_queue = alloc_workqueue("kcryptd",
WQ_NON_REENTRANT|
WQ_CPU_INTENSIVE|
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/39348b5ea9115f07d054150751054c7bab0eda32
More information about the pld-cvs-commit
mailing list