lkml.org 
[lkml]   [2008]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[RFC][PATCH 10/10] I/O context inheritance
From

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;

\
 
 \ /
  Last update: 2008-04-22 16:03    [W:0.077 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site