]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: fix inaccurate result of unused buckets
authorGuoju Fang <fangguoju@gmail.com>
Wed, 24 Apr 2019 16:48:27 +0000 (00:48 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Apr 2019 16:56:27 +0000 (10:56 -0600)
commit7df5e278dbedca801399d3eecd2f02830b09c7ba
tree66350dd21a326b3da8d83262caa4f3ae7f4efd56
parent8d51e08bdd0e5059ea6a30dbd3b6d869f7d7784d
bcache: fix inaccurate result of unused buckets

To get the amount of unused buckets in sysfs_priority_stats, the code
count the buckets which GC_SECTORS_USED is zero. It's correct and should
not be overwritten by the count of buckets which prio is zero.

Signed-off-by: Guoju Fang <fangguoju@gmail.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/sysfs.c