summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_background.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-02-07 16:58:34 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-14 21:02:13 -0400
commit34a493089af2f2f773c0c802e84b0a493115cd50 (patch)
treed11ca50c58d33f690f34092fcbd11e5118a8b8b7 /fs/bcachefs/alloc_background.h
parentfd49882f124a6315f0b0204abe2774f8b34a694b (diff)
downloadlinux-next-34a493089af2f2f773c0c802e84b0a493115cd50.tar.gz
linux-next-34a493089af2f2f773c0c802e84b0a493115cd50.zip
bcachefs: bch2_bkey_ptr_data_type() now correctly returns cached for cached ptrs
Necessary for adding backpointers for cached pointers. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.h')
-rw-r--r--fs/bcachefs/alloc_background.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.h b/fs/bcachefs/alloc_background.h
index de25ba4ee94b..c556ccaffe89 100644
--- a/fs/bcachefs/alloc_background.h
+++ b/fs/bcachefs/alloc_background.h
@@ -131,7 +131,7 @@ static inline enum bch_data_type alloc_data_type(struct bch_alloc_v4 a,
if (a.stripe)
return data_type == BCH_DATA_parity ? data_type : BCH_DATA_stripe;
if (bch2_bucket_sectors_dirty(a))
- return data_type;
+ return bucket_data_type(data_type);
if (a.cached_sectors)
return BCH_DATA_cached;
if (BCH_ALLOC_V4_NEED_DISCARD(&a))