diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-17 13:39:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-17 14:08:42 -0400 |
commit | d915c62f17ae8d8214819fe150422d32c5b1c79c (patch) | |
tree | acdb02a2786449553503dcd8b5bcf100f28c1750 /libbcachefs/sb-downgrade.c | |
parent | fc06a0ea5e552663e9e47de941fbc7e621d4ca46 (diff) |
Update bcachefs sources to 792ca5ba3c9a bcachefs: kill key cache arg to bch2_assert_pos_locked()
Diffstat (limited to 'libbcachefs/sb-downgrade.c')
-rw-r--r-- | libbcachefs/sb-downgrade.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libbcachefs/sb-downgrade.c b/libbcachefs/sb-downgrade.c index 511e80b3..be81c8c6 100644 --- a/libbcachefs/sb-downgrade.c +++ b/libbcachefs/sb-downgrade.c @@ -57,13 +57,17 @@ BCH_FSCK_ERR_btree_bitmap_not_marked) \ x(disk_accounting_v2, \ BIT_ULL(BCH_RECOVERY_PASS_check_allocations), \ + BCH_FSCK_ERR_bkey_version_in_future, \ + BCH_FSCK_ERR_dev_usage_buckets_wrong, \ + BCH_FSCK_ERR_dev_usage_sectors_wrong, \ + BCH_FSCK_ERR_dev_usage_fragmented_wrong, \ BCH_FSCK_ERR_accounting_mismatch) #define DOWNGRADE_TABLE() \ x(bucket_stripe_sectors, \ 0) \ x(disk_accounting_v2, \ - BIT_ULL(BCH_RECOVERY_PASS_check_alloc_info), \ + BIT_ULL(BCH_RECOVERY_PASS_check_allocations), \ BCH_FSCK_ERR_dev_usage_buckets_wrong, \ BCH_FSCK_ERR_dev_usage_sectors_wrong, \ BCH_FSCK_ERR_dev_usage_fragmented_wrong, \ @@ -187,7 +191,11 @@ static int downgrade_table_extra(struct bch_fs *c, darray_char *table) if (ret) return ret; - __set_bit_le64(BCH_RECOVERY_PASS_STABLE_check_allocations, dst->recovery_passes); + /* open coded __set_bit_le64, as dst is packed and + * dst->recovery_passes is misaligned */ + unsigned b = BCH_RECOVERY_PASS_STABLE_check_allocations; + dst->recovery_passes[b / 64] |= cpu_to_le64(BIT_ULL(b % 64)); + dst->errors[nr_errors++] = cpu_to_le16(BCH_FSCK_ERR_alloc_key_dirty_sectors_wrong); } break; |