summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_background.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-01-10 19:46:39 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2022-01-10 21:03:07 -0500
commit215ae52a43d30b249f0a4e4086e553c11ccac9fe (patch)
treea71b6b7d164901e0b3d035b795fed1970991ccb7 /fs/bcachefs/alloc_background.c
parent289739217ad1a7b0a51dbe6f6ee0a7c35e07974c (diff)
bcachefs: Ignore cached data when calculating fragmentationtesting
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r--fs/bcachefs/alloc_background.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index fac2176a4f3b..52ecc8157305 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -543,7 +543,7 @@ static bool bch2_can_invalidate_bucket(struct bch_dev *ca, size_t b,
static unsigned bucket_sort_key(struct bucket *g, struct bucket_mark m,
u64 now, u64 last_seq_ondisk)
{
- unsigned used = bucket_sectors_used(m);
+ unsigned used = m.cached_sectors;
if (used) {
/*