• Chris Mason's avatar
    Btrfs: make sure to flush queued bios if write_cache_pages waits · 01d658f2
    Chris Mason authored
    write_cache_pages tries to build up a large bio to stuff down the pipe.
    But if it needs to wait for a page lock, it needs to make sure and send
    down any pending writes so we don't deadlock with anyone who has the
    page lock and is waiting for writeback of things inside the bio.
    
    Dave Sterba triggered this as a deadlock between the autodefrag code and
    the extent write_cache_pages
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    01d658f2
extent_io.h 11.2 KB