Jens Axboe wrote:
> I think you are making this way too complicated, it's actually pretty
> simple: you call blk_put_queue() or blk_cleanup_queue() (same thing)
> when _you_ drop your reference to the queue. That's just normal cleanup.
> When a device goes away, you make sure that you know about this. I said
> that SCSI clears q->queuedata, so it knows that when ->request_fn is
> invoked with a NULL q->queuedata (where it stores the device pointer),
> the device is not there and the request should just be flushed to
> heaven.
>
What about the gendisk object? Since I assigned the queue pointer to it,
it didn't naturally get a chance to increase the reference count. When
can I safely drop my reference without the gendisk getting upset?
> Don't make any assumptions about when request_fn will be called or not.
> That's bound to be racy anyway.
>
>
Things get a bit muddy by the fact that the mmc layer has a thread that
handles the queue. So I guess we need to have a way to shut down that
thread, but still be able to throw away any stray requests from the
block layer?
Rgds
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]