[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [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 valinux 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]