[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080422.230017.69986283.taka@valinux.co.jp>
Date:	Tue, 22 Apr 2008 23:00:17 +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 10/10] I/O context inheritance
The floppy driver will allocate a bio on its stack, so its iocontext
should be set here.
This code hasn't been tested yet.
Signed-off-by: Hirokazu Takahashi <taka@...inux.co.jp>
--- linux-2.6.25.bio0/drivers/block/floppy.c	2008-04-22 15:48:36.000000000 +0900
+++ linux-2.6.25/drivers/block/floppy.c	2008-04-22 21:33:40.000000000 +0900
@@ -3845,12 +3845,14 @@ static int __floppy_read_block_0(struct 
 	init_completion(&complete);
 	bio.bi_private = &complete;
 	bio.bi_end_io = floppy_rb0_complete;
+	bio.bi_io_context = get_io_context(GFP_NOIO, -1);
 
 	submit_bio(READ, &bio);
 	generic_unplug_device(bdev_get_queue(bdev));
 	process_fd_request();
 	wait_for_completion(&complete);
 
+	put_io_context(bio.bi_io_context);
 	__free_page(page);
 
 	return 0;
--
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
 
