• Jens Axboe's avatar
    Revert "blk-flush: Queue through IO scheduler when flush not required" · dcd8376c
    Jens Axboe authored
    This reverts commit 1b2ff19e.
    
    Jan writes:
    
    --
    
    Thanks for report! After some investigation I found out we allocate
    elevator specific data in __get_request() only for non-flush requests. And
    this is actually required since the flush machinery uses the space in
    struct request for something else. Doh. So my patch is just wrong and not
    easy to fix since at the time __get_request() is called we are not sure
    whether the flush machinery will be used in the end. Jens, please revert
    1b2ff19e. Thanks!
    
    I'm somewhat surprised that you can reliably hit the race where flushing
    gets disabled for the device just while the request is in flight. But I
    guess during boot it makes some sense.
    
    --
    
    So let's just revert it, we can fix the queue run manually after the
    fact. This race is rare enough that it didn't trigger in testing, it
    requires the specific disable-while-in-flight scenario to trigger.
    dcd8376c
blk-flush.c 15.2 KB