Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84582
b: refs/heads/master
c: 84131db
h: refs/heads/master
v: v3
  • Loading branch information
Milan Broz authored and Alasdair G Kergon committed Feb 8, 2008
1 parent 3cd5f73 commit ec85adc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dec1cedf9d4eabe43f3c7d6af095eff40c139a89
refs/heads/master: 84131db689ab86409315c15a3ea5daf732cb04e1
16 changes: 11 additions & 5 deletions trunk/drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit ec85adc

Please sign in to comment.