lkml.org 
[lkml]   [2020]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 04/10] block: revert back to synchronous request_queue removal
From
Date
On 4/20/20 11:59 AM, Luis Chamberlain wrote:
> 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?

Instead of trying to answer that question, how about changing the
references to bdgrab() and bdput() into references to blk_get_queue()
and blk_put_queue()? I think if that change is made that we won't have
to research what the answer to the bdgrab()/bdput() question is.

Thanks,

Bart.

\
 
 \ /
  Last update: 2020-04-20 23:11    [W:0.098 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site