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: unify io_queue and crypt_queue

Unify these two request queues. There is no need to have two queues, one
is enough. No encryption operations are done in the queue anyway.

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

diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 967d218..d6306f1 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -127,7 +127,6 @@ struct crypt_config {
struct bio_set *bs;

struct workqueue_struct *io_queue;
- struct workqueue_struct *crypt_queue;
unsigned crypt_threads_size;
int num_threads_value; /* the value entered in the arguments */
struct task_struct **crypt_threads;
@@ -1281,7 +1280,7 @@ static void kcryptd_queue_crypt(struct dm_crypt_io *io)
struct crypt_config *cc = io->cc;

INIT_WORK(&io->work, kcryptd_crypt);
- queue_work(cc->crypt_queue, &io->work);
+ queue_work(cc->io_queue, &io->work);
}

/*
@@ -1432,8 +1431,6 @@ static void crypt_dtr(struct dm_target *ti)

if (cc->io_queue)
destroy_workqueue(cc->io_queue);
- if (cc->crypt_queue)
- destroy_workqueue(cc->crypt_queue);

crypt_free_tfms(cc);

@@ -1751,15 +1748,6 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
goto bad;
}

- cc->crypt_queue = alloc_workqueue("kcryptd",
- WQ_NON_REENTRANT|
- WQ_MEM_RECLAIM,
- 1);
- if (!cc->crypt_queue) {
- ti->error = "Couldn't create kcryptd queue";
- goto bad;
- }
-
if (num_threads == num_online_cpus()) {
for (i = 0; i < NR_CPUS; i++)
if (cpu_online(i))
--
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 04:15 AM.

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