On Sun, Apr 19, 2020 at 03:23:31PM -0700, Bart Van Assche wrote:
On 4/19/20 12:45 PM, Luis Chamberlain wrote:
+ * Decrements the refcount to the request_queue kobject, when this reaches
+ * 0 we'll have blk_release_queue() called. You should avoid calling
+ * this function in atomic context but if you really have to ensure you
+ * first refcount the block device with bdgrab() / bdput() so that the
+ * last decrement happens in blk_cleanup_queue().
+ */
Is calling bdgrab() and bdput() an option from a context in which it is not
guaranteed that the block device is open?
If the block device is not open, nope. For that blk_get_queue() can
be used, and is used by the block layer. This begs the question:
Do we have *drivers* which requires access to the request_queue from
atomic context when the block device is not open?