summary refs log tree commit diff
path: root/include/uapi
diff options
context:
space:
mode:
authorColy Li <colyli@suse.de>2020-01-24 01:01:42 +0800
committerJens Axboe <axboe@kernel.dk>2020-01-23 11:40:02 -0700
commite3de04469a49ee09c89e80bf821508df458ccee6 (patch)
tree194f994ea2493a2a6f28680acbd2ecb3ef14d5ff /include/uapi
parentd5c9c470b01177e4d90cdbf178b8c7f37f5b8795 (diff)
downloadlinux-e3de04469a49ee09c89e80bf821508df458ccee6.tar.gz
bcache: reap from tail of c->btree_cache in bch_mca_scan()
When shrink btree node cache from c->btree_cache in bch_mca_scan(),
no matter the selected node is reaped or not, it will be rotated from
the head to the tail of c->btree_cache list. But in bcache journal
code, when flushing the btree nodes with oldest journal entry, btree
nodes are iterated and slected from the tail of c->btree_cache list in
btree_flush_write(). The list_rotate_left() in bch_mca_scan() will
make btree_flush_write() iterate more nodes in c->btree_list in reverse
order.

This patch just reaps the selected btree node cache, and not move it
from the head to the tail of c->btree_cache list. Then bch_mca_scan()
will not mess up c->btree_cache list to btree_flush_write().

Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions