Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=84131db689ab86409315c15a3ea5daf732cb04e1
Commit:     84131db689ab86409315c15a3ea5daf732cb04e1
Parent:     dec1cedf9d4eabe43f3c7d6af095eff40c139a89
Author:     Milan Broz <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 8 02:10:59 2008 +0000
Committer:  Alasdair G Kergon <[EMAIL PROTECTED]>
CommitDate: Fri Feb 8 02:10:59 2008 +0000

    dm crypt: introduce crypt_write_io_loop
    
    Introduce crypt_write_io_loop().
    
    Signed-off-by: Milan Broz <[EMAIL PROTECTED]>
    Signed-off-by: Alasdair G Kergon <[EMAIL PROTECTED]>
---
 drivers/md/dm-crypt.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 4df7d2f..986283c 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -595,17 +595,13 @@ static void kcryptd_crypt_write_io_submit(struct 
dm_crypt_io *io, int error)
        io->sector += bio_sectors(clone);
 }
 
-static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
+static void kcryptd_crypt_write_convert_loop(struct dm_crypt_io *io)
 {
        struct crypt_config *cc = io->target->private;
        struct bio *clone;
        unsigned remaining = io->base_bio->bi_size;
        int r;
 
-       atomic_inc(&io->pending);
-
-       crypt_convert_init(cc, &io->ctx, NULL, io->base_bio, io->sector);
-
        /*
         * The allocated buffers can be smaller than the whole bio,
         * so repeat the whole process until all the data can be handled.
@@ -645,6 +641,16 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io 
*io)
        }
 }
 
+static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
+{
+       struct crypt_config *cc = io->target->private;
+
+       atomic_inc(&io->pending);
+
+       crypt_convert_init(cc, &io->ctx, NULL, io->base_bio, io->sector);
+       kcryptd_crypt_write_convert_loop(io);
+}
+
 static void kcryptd_crypt_read_done(struct dm_crypt_io *io, int error)
 {
        if (unlikely(error < 0))
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to