Re: Loop device bug #2

From: Jens Axboe (axboe@suse.de)
Date: Fri Jun 09 2000 - 08:43:35 EST


On Fri, Jun 09 2000, Andries Brouwer wrote:
> diff -u --recursive --new-file ../linux-2.3.99p9/linux/drivers/block/loop.c ./linux/drivers/block/loop.c
> --- ../linux-2.3.99p9/linux/drivers/block/loop.c Wed May 24 15:18:10 2000
> +++ ./linux/drivers/block/loop.c Sat May 20 14:21:47 2000
> @@ -761,6 +761,10 @@
> EXPORT_SYMBOL(loop_register_transfer);
> EXPORT_SYMBOL(loop_unregister_transfer);
>
> +static void no_plug_device(void)
> +{
> +}
> +
> int __init loop_init(void)
> {
> int i;
> @@ -806,6 +810,7 @@
> }
>
> blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
> + ((request_queue_t *) BLK_DEFAULT_QUEUE(MAJOR_NR))->plug_device_fn = no_plug_device;

        blk_queue_pluggable(BLK_DEFAULT_QUEUE(MAJOR_NR), no_plug_device);

would look nicer here.

> diff -u --recursive --new-file ../linux-2.3.99p9/linux/drivers/block/ll_rw_blk.c ./linux/drivers/block/ll_rw_blk.c
> --- ../linux-2.3.99p9/linux/drivers/block/ll_rw_blk.c Sat May 13 03:19:46 2000
> +++ ./linux/drivers/block/ll_rw_blk.c Sun May 21 17:01:21 2000
> @@ -586,7 +586,7 @@
> * Cut max_req in half to avoid running out and deadlocking.
> */
> if ((major == LOOP_MAJOR) || (major == NBD_MAJOR))
> - max_req >>= 1;
> + max_req >>= 2;

This just moves the problem, it is not a fix. Plugging definately needs
to be disabled or loop will break, I agree that that part is correct.
The reason why this shows up now is that plugging is now default for
all devices.

-- 
* Jens Axboe <axboe@suse.de>
* SuSE Labs

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:18 EST