projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1568ee7
)
bcache: fix inaccurate result of unused buckets
author
Guoju Fang
<fangguoju@gmail.com>
Wed, 24 Apr 2019 16:48:27 +0000
(
00:48
+0800)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 24 Apr 2019 16:56:27 +0000
(10:56 -0600)
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
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/bcache/sysfs.c
b/drivers/md/bcache/sysfs.c
index 17bae9c14ca0a284274cacdfd8c328ee86e8a57f..6cd44d3cf906a68b80e77ace3ef1ba2c92f7b77d 100644
(file)
--- a/
drivers/md/bcache/sysfs.c
+++ b/
drivers/md/bcache/sysfs.c
@@
-996,8
+996,6
@@
SHOW(__bch_cache)
!cached[n - 1])
--n;
- unused = ca->sb.nbuckets - n;
-
while (cached < p + n &&
*cached == BTREE_PRIO)
cached++, n--;