Skip to content

Commit 03013bb

Browse files
author
Kent Overstreet
committed
bcachefs: Fix bucket data type for stripe buckets
Signed-off-by: Kent Overstreet <[email protected]>
1 parent d5bd378 commit 03013bb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

fs/bcachefs/buckets.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -854,8 +854,12 @@ static int __mark_pointer(struct btree_trans *trans,
854854
return ret;
855855

856856
*dst_sectors += sectors;
857-
*bucket_data_type = *dirty_sectors || *cached_sectors
858-
? ptr_data_type : 0;
857+
858+
if (!*dirty_sectors && !*cached_sectors)
859+
*bucket_data_type = 0;
860+
else if (*bucket_data_type != BCH_DATA_stripe)
861+
*bucket_data_type = ptr_data_type;
862+
859863
return 0;
860864
}
861865

0 commit comments

Comments
 (0)