FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 08-21-2012, 09:09 AM
Mikulas Patocka
 
Default dm-crypt: don't use write queue

Don't use write queue and allocate write data directly from the request routine.
There is no need to bounce requests through a queue.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
---
drivers/md/dm-crypt.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index fd2909d..4fd0d4b 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -1278,10 +1278,8 @@ static void kcryptd_crypt(struct work_struct *work)
{
struct dm_crypt_io *io = container_of(work, struct dm_crypt_io, work);

- if (bio_data_dir(io->base_bio) == READ)
- kcryptd_crypt_read_convert(io);
- else
- kcryptd_crypt_write_convert(io);
+ BUG_ON(bio_data_dir(io->base_bio) != READ);
+ kcryptd_crypt_read_convert(io);
}

static void kcryptd_queue_crypt(struct dm_crypt_io *io)
@@ -1850,8 +1848,9 @@ static int crypt_map(struct dm_target *ti, struct bio *bio,
if (bio_data_dir(io->base_bio) == READ) {
if (kcryptd_io_read(io, GFP_NOWAIT))
kcryptd_queue_io(io);
- } else
- kcryptd_queue_crypt(io);
+ } else {
+ kcryptd_crypt_write_convert(io);
+ }

return DM_MAPIO_SUBMITTED;
}
--
1.7.10.4

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 07:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org