lkml.org 
[lkml]   [2014]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: WARNING in block layer triggered in 3.17-rc3
    From
    So should a request queue be in bypass mode when the device is being detached
    and queue is being unregistereed because requests can get queued up?


    On Mon, Sep 8, 2014 at 9:51 AM, Alan Stern <stern@rowland.harvard.edu> wrote:
    > On Sun, 7 Sep 2014, Shirish Pargaonkar wrote:
    >
    >> I think the problem is, when a gendisk is detached, its request queue
    >> is not put in bypass mode
    >> cause when it is re-attached, code tries to put it out of bypass mode,
    >> hence the warning.
    >>
    >> So either of these should work, I have not tested it, just coded it up.
    >
    > I'm pretty sure that both of your solutions are wrong.
    >
    > Jens and James, it appears the problem is in blk_register_queue(). The
    > code does this:
    >
    > /*
    > * Initialization must be complete by now. Finish the initial
    > * bypass from queue allocation.
    > */
    > queue_flag_set_unlocked(QUEUE_FLAG_INIT_DONE, q);
    > blk_queue_bypass_end(q);
    >
    > This doesn't work well if the queue is unregistered later and then
    > registered again -- which is what happens when the sd driver is unbound
    > from a device and then bound again. It looks like the code should be:
    >
    > if (!queue_flag_test_and_set(QUEUE_FLAG_INIT_DONE, q))
    > blk_queue_bypass_end(q);
    >
    > Do you agree? If so, I'll send in patch.
    >
    > Alan Stern
    >


    \
     
     \ /
      Last update: 2014-09-08 17:21    [W:3.447 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site