• Coly Li's avatar
    bcache: avoid flushing btree node in cache_set_flush() if io disabled · e6dcbd3e
    Coly Li authored
    When cache_set_flush() is called for too many I/O errors detected on
    cache device and the cache set is retiring, inside the function it
    doesn't make sense to flushing cached btree nodes from c->btree_cache
    because CACHE_SET_IO_DISABLE is set on c->flags already and all I/Os
    onto cache device will be rejected.
    
    This patch checks in cache_set_flush() that whether CACHE_SET_IO_DISABLE
    is set. If yes, then avoids to flush the cached btree nodes to reduce
    more time and make cache set retiring more faster.
    Signed-off-by: default avatarColy Li <colyli@suse.de>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    e6dcbd3e
super.c 61.9 KB