diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-25 23:55:26 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-28 17:18:24 -0500 |
commit | 03013bb0c6b157630018800a456a08646655ea97 (patch) | |
tree | 28a2830124ebbc9c7fd48d59592367e0e21b71ee /fs/bcachefs/buckets.c | |
parent | d5bd37872a93e07ef3f9cbd4e2044ba4e17b5021 (diff) | |
download | lwn-03013bb0c6b157630018800a456a08646655ea97.tar.gz lwn-03013bb0c6b157630018800a456a08646655ea97.zip |
bcachefs: Fix bucket data type for stripe buckets
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/buckets.c')
-rw-r--r-- | fs/bcachefs/buckets.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 61e4cc09ad83..5a91d3189fcf 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -854,8 +854,12 @@ static int __mark_pointer(struct btree_trans *trans, return ret; *dst_sectors += sectors; - *bucket_data_type = *dirty_sectors || *cached_sectors - ? ptr_data_type : 0; + + if (!*dirty_sectors && !*cached_sectors) + *bucket_data_type = 0; + else if (*bucket_data_type != BCH_DATA_stripe) + *bucket_data_type = ptr_data_type; + return 0; } |