Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-03-01 Thread Jens Axboe
On Thu, Mar 01 2001, Jens Axboe wrote: > I've suggested that before, turn ndb into ndb_make_request style > driver and all of this will disappear. I'll give it a shot. Here's a first shot, compile tested but that's it. Steve, does this work for you? Against 2.4.2-ac7 -- Jens Axboe diff -ur

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-03-01 Thread Jens Axboe
On Wed, Feb 28 2001, Linus Torvalds wrote: > >I think most of the "we want to disable plugging" behaviour stems > >from the way task queues behave. Once somebody starts a tq_disk > >run, the list is fried and walked one by one. Both old loop > >and nbd drop the io_request_lock and block, possibly

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-03-01 Thread Jens Axboe
On Wed, Feb 28 2001, Linus Torvalds wrote: I think most of the "we want to disable plugging" behaviour stems from the way task queues behave. Once somebody starts a tq_disk run, the list is fried and walked one by one. Both old loop and nbd drop the io_request_lock and block, possibly waiting

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-03-01 Thread Jens Axboe
On Thu, Mar 01 2001, Jens Axboe wrote: I've suggested that before, turn ndb into ndb_make_request style driver and all of this will disappear. I'll give it a shot. Here's a first shot, compile tested but that's it. Steve, does this work for you? Against 2.4.2-ac7 -- Jens Axboe diff -ur

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Linus Torvalds
In article <[EMAIL PROTECTED]>, Jens Axboe <[EMAIL PROTECTED]> wrote: > >I think most of the "we want to disable plugging" behaviour stems >from the way task queues behave. Once somebody starts a tq_disk >run, the list is fried and walked one by one. Both old loop >and nbd drop the

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Jens Axboe
On Wed, Feb 28 2001, Linus Torvalds wrote: > As far as I can tell, the patch will trigger only for a not-empty request > list, where the elevator decides to put the new request at the head of the > queue. > > Which is probably unlikely (and with the current elevator it might even be >

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Linus Torvalds
On Wed, 28 Feb 2001, Steve Whitehouse wrote: > > I tested the patch with a printk() which printed whenever the new call to the > request function was triggered. It didn't happen once in normal fs use > with ext2 on a scsi disk. As far as I can tell, the patch will trigger only for a not-empty

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Jens Axboe
On Wed, Feb 28 2001, Steve Whitehouse wrote: > > > The bug fix in ll_rw_blk.c prevents hangs when using block devices which > > > don't have plugging functions, > > > > I'm convinced that the right fix is to just make everybody have plugging > > functions. > > > I'm working on that. Once I've

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Steve Whitehouse
Hi, > > > > On Sun, 25 Feb 2001, Steve Whitehouse wrote: > > > > Here is a new version of the patch I recently sent to the list with some > > NBD cleanups and a bug fix in ll_rw_blk.c. The changes to NBD have Pavel > > Machek's approval as I've left out the two changes as he suggested. > >

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Linus Torvalds
On Sun, 25 Feb 2001, Steve Whitehouse wrote: > > Here is a new version of the patch I recently sent to the list with some > NBD cleanups and a bug fix in ll_rw_blk.c. The changes to NBD have Pavel > Machek's approval as I've left out the two changes as he suggested. > > The bug fix in

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Linus Torvalds
On Sun, 25 Feb 2001, Steve Whitehouse wrote: Here is a new version of the patch I recently sent to the list with some NBD cleanups and a bug fix in ll_rw_blk.c. The changes to NBD have Pavel Machek's approval as I've left out the two changes as he suggested. The bug fix in ll_rw_blk.c

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Steve Whitehouse
Hi, On Sun, 25 Feb 2001, Steve Whitehouse wrote: Here is a new version of the patch I recently sent to the list with some NBD cleanups and a bug fix in ll_rw_blk.c. The changes to NBD have Pavel Machek's approval as I've left out the two changes as he suggested. The bug

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Jens Axboe
On Wed, Feb 28 2001, Steve Whitehouse wrote: The bug fix in ll_rw_blk.c prevents hangs when using block devices which don't have plugging functions, I'm convinced that the right fix is to just make everybody have plugging functions. I'm working on that. Once I've discovered why

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Linus Torvalds
On Wed, 28 Feb 2001, Steve Whitehouse wrote: I tested the patch with a printk() which printed whenever the new call to the request function was triggered. It didn't happen once in normal fs use with ext2 on a scsi disk. As far as I can tell, the patch will trigger only for a not-empty

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Jens Axboe
On Wed, Feb 28 2001, Linus Torvalds wrote: As far as I can tell, the patch will trigger only for a not-empty request list, where the elevator decides to put the new request at the head of the queue. Which is probably unlikely (and with the current elevator it might even be impossible). But

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-28 Thread Linus Torvalds
In article [EMAIL PROTECTED], Jens Axboe [EMAIL PROTECTED] wrote: I think most of the "we want to disable plugging" behaviour stems from the way task queues behave. Once somebody starts a tq_disk run, the list is fried and walked one by one. Both old loop and nbd drop the io_request_lock and

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Steve Whitehouse
Hi, Oops, sorry. Updated patch below. Jens & Russell: Thanks for pointing this out, Steve. > > On Sun, Feb 25 2001, Russell King wrote: > > On Sun, Feb 25, 2001 at 07:57:29PM +, Steve Whitehouse wrote: > > > -int nbd_init(void) > > > +int __init nbd_init(void) > > > > > -void

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Jens Axboe
On Sun, Feb 25 2001, Russell King wrote: > On Sun, Feb 25, 2001 at 07:57:29PM +, Steve Whitehouse wrote: > > -int nbd_init(void) > > +int __init nbd_init(void) > > > -void cleanup_module(void) > > +void __exit nbd_cleanup(void) > > > + > > +module_init(nbd_init); > >

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Russell King
On Sun, Feb 25, 2001 at 07:57:29PM +, Steve Whitehouse wrote: > -int nbd_init(void) > +int __init nbd_init(void) > -void cleanup_module(void) > +void __exit nbd_cleanup(void) > + > +module_init(nbd_init); > +module_exit(nbd_cleanup); If you're using module_init/module_exit, shouldn't

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Jens Axboe
On Sun, Feb 25 2001, Andrea Arcangeli wrote: > On Sun, Feb 25, 2001 at 07:57:29PM +, Steve Whitehouse wrote: > > The bug fix in ll_rw_blk.c prevents hangs when using block devices which > > don't have plugging functions, > > It looks the right fix (better than 2.4.0 that didn't had such bug

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Andrea Arcangeli
On Sun, Feb 25, 2001 at 07:57:29PM +, Steve Whitehouse wrote: > The bug fix in ll_rw_blk.c prevents hangs when using block devices which > don't have plugging functions, It looks the right fix (better than 2.4.0 that didn't had such bug but that was recalling the request_fn at every

NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Steve Whitehouse
Hi, Here is a new version of the patch I recently sent to the list with some NBD cleanups and a bug fix in ll_rw_blk.c. The changes to NBD have Pavel Machek's approval as I've left out the two changes as he suggested. The bug fix in ll_rw_blk.c prevents hangs when using block devices which

NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Steve Whitehouse
Hi, Here is a new version of the patch I recently sent to the list with some NBD cleanups and a bug fix in ll_rw_blk.c. The changes to NBD have Pavel Machek's approval as I've left out the two changes as he suggested. The bug fix in ll_rw_blk.c prevents hangs when using block devices which

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Andrea Arcangeli
On Sun, Feb 25, 2001 at 07:57:29PM +, Steve Whitehouse wrote: The bug fix in ll_rw_blk.c prevents hangs when using block devices which don't have plugging functions, It looks the right fix (better than 2.4.0 that didn't had such bug but that was recalling the request_fn at every inserction

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Jens Axboe
On Sun, Feb 25 2001, Andrea Arcangeli wrote: On Sun, Feb 25, 2001 at 07:57:29PM +, Steve Whitehouse wrote: The bug fix in ll_rw_blk.c prevents hangs when using block devices which don't have plugging functions, It looks the right fix (better than 2.4.0 that didn't had such bug but

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Russell King
On Sun, Feb 25, 2001 at 07:57:29PM +, Steve Whitehouse wrote: -int nbd_init(void) +int __init nbd_init(void) -void cleanup_module(void) +void __exit nbd_cleanup(void) + +module_init(nbd_init); +module_exit(nbd_cleanup); If you're using module_init/module_exit, shouldn't

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Jens Axboe
On Sun, Feb 25 2001, Russell King wrote: On Sun, Feb 25, 2001 at 07:57:29PM +, Steve Whitehouse wrote: -int nbd_init(void) +int __init nbd_init(void) -void cleanup_module(void) +void __exit nbd_cleanup(void) + +module_init(nbd_init); +module_exit(nbd_cleanup); If you're

Re: NBD Cleanup patch and bugfix in ll_rw_blk.c

2001-02-25 Thread Steve Whitehouse
Hi, Oops, sorry. Updated patch below. Jens Russell: Thanks for pointing this out, Steve. On Sun, Feb 25 2001, Russell King wrote: On Sun, Feb 25, 2001 at 07:57:29PM +, Steve Whitehouse wrote: -int nbd_init(void) +int __init nbd_init(void) -void cleanup_module(void)