Re: 2.5.69-mjb1: undefined reference to `blk_queue_empty'

From: Jens Axboe (axboe@suse.de)
Date: Tue May 13 2003 - 13:11:55 EST


On Tue, May 13 2003, Martin J. Bligh wrote:
> > I have already sent you a fix for this. Anyway here it is again.
>
> Oops, I must have dropped it - thanks, I'll stick it in the next release.
>
> > --- linux-2.5.69/drivers/dump/dump_blockdev.c.orig Tue May 13 12:30:49 2003
> > +++ linux-2.5.69/drivers/dump/dump_blockdev.c Tue May 13 12:34:09 2003
> > @@ -261,7 +261,7 @@
> >
> > /* For now we assume we have the device to ourselves */
> > /* Just a quick sanity check */
> > - if (!blk_queue_empty(bdev_get_queue(dump_bdev->bdev))) {
> > + if (elv_next_request(bdev_get_queue(dump_bdev->bdev))) {
> > /* i/o in flight - safer to quit */
> > return -EBUSY;
> > }

this looks horribly racy (of the io scheduler internals corrupting
kind), I don't see you holding the queue lock here. some io schedulers
do non-significant amount of work inside they next_request functions,
moving from back-end lists to dispatch queue.

-- 
Jens Axboe

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



This archive was generated by hypermail 2b29 : Thu May 15 2003 - 22:00:46 EST