[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080422.225355.07850141.taka@valinux.co.jp>
Date: Tue, 22 Apr 2008 22:53:55 +0900 (JST)
From: Hirokazu Takahashi <taka@...inux.co.jp>
To: jens.axboe@...cle.com, agk@...rceware.org
Cc: dm-devel@...hat.com, linux-kernel@...r.kernel.org
Subject: [RFC][PATCH 3/10] I/O context inheritance
Make every bio points the iocontext of the process which originally
generated an I/O request. (part 2)
- Assign the iocontext which the source bio has to a bio when it is
allocated as a bounce buffer.
- Assign the iocontext which the source bio has to bios when the source
bio is split into several ones, which some device mapper modules require.
Signed-off-by: Hirokazu Takahashi <taka@...inux.co.jp>
--- linux-2.6.25.bio0/mm/bounce.c 2008-04-22 15:48:32.000000000 +0900
+++ linux-2.6.25/mm/bounce.c 2008-04-22 15:51:33.000000000 +0900
@@ -195,8 +195,11 @@ static void __blk_queue_bounce(struct re
/*
* irk, bounce it
*/
- if (!bio)
+ if (!bio) {
bio = bio_alloc(GFP_NOIO, (*bio_orig)->bi_vcnt);
+ put_io_context(bio->bi_io_context);
+ bio->bi_io_context = ioc_object_link((*bio_orig)->bi_io_context);
+ }
to = bio->bi_io_vec + i;
--- linux-2.6.25.bio0/drivers/md/dm.c 2008-04-22 15:48:33.000000000 +0900
+++ linux-2.6.25/drivers/md/dm.c 2008-04-22 17:16:49.000000000 +0900
@@ -665,6 +665,7 @@ static struct bio *split_bvec(struct bio
clone->bi_size = to_bytes(len);
clone->bi_io_vec->bv_offset = offset;
clone->bi_io_vec->bv_len = clone->bi_size;
+ clone->bi_io_context = ioc_object_link(bio->bi_io_context);
return clone;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists