Re: IDE locking problem

From: Jens Axboe (axboe@suse.de)
Date: Sun Aug 03 2003 - 05:20:05 EST


On Sun, Aug 03 2003, Benjamin Herrenschmidt wrote:
>
> > > would help making sure we don't get a request sneaking in ?
> >
> > Hmm not really, there's still a chance that could happen.
>
> Not too familiar with BIO here, but we would need some kind of
> "dead" flag to cause a reject of any try to insert a new request
> in the queue, don't you think ?

That's exactly right.

> Then, IDE could do something like:
>
> - set dead flag
> - wait for all pending requests to drain (easy: insert a barrier
> in the queue and wait on it, with a hack for the barrier insertion
> to bypass the dead flag... ugh... maybe a blk_terminate_queue()
> doing all that would be helpful ?)
> - unregister blkdev
> - then tear down the queue (leaving the "empty" queue with the dead
> flag set, not just memset(...,0,...), so that any bozo keeping a
> reference to it will be rejected trying to insert request instead
> of trying to tap an uninitalized queue object
>
> What do you think ?

Sounds like just the ticket. It's basically impossible to properly
shutdown a queue without being able to quisce it like you describe. IO
events are unpredictable :)

-- 
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 Aug 07 2003 - 22:00:21 EST