]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bcachefs: Mark inode errors as autofix
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 23 Sep 2024 20:40:47 +0000 (16:40 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 28 Sep 2024 01:46:34 +0000 (21:46 -0400)
Most or all errors will be autofix in the future, we're currently just
doing the ones that we know are well tested.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/sb-errors_format.h

index f0c14702f9e62c5331af891ec78b7f16864de261..4e4e132d6d232d62d5baedf04cc49a93fb6b4bc5 100644 (file)
@@ -213,19 +213,19 @@ enum bch_fsck_flags {
        x(inode_checksum_type_invalid,                          199,    0)              \
        x(inode_compression_type_invalid,                       200,    0)              \
        x(inode_subvol_root_but_not_dir,                        201,    0)              \
-       x(inode_i_size_dirty_but_clean,                         202,    0)              \
-       x(inode_i_sectors_dirty_but_clean,                      203,    0)              \
-       x(inode_i_sectors_wrong,                                204,    0)              \
-       x(inode_dir_wrong_nlink,                                205,    0)              \
-       x(inode_dir_multiple_links,                             206,    0)              \
-       x(inode_multiple_links_but_nlink_0,                     207,    0)              \
-       x(inode_wrong_backpointer,                              208,    0)              \
-       x(inode_wrong_nlink,                                    209,    0)              \
-       x(inode_unreachable,                                    210,    0)              \
-       x(deleted_inode_but_clean,                              211,    0)              \
-       x(deleted_inode_missing,                                212,    0)              \
-       x(deleted_inode_is_dir,                                 213,    0)              \
-       x(deleted_inode_not_unlinked,                           214,    0)              \
+       x(inode_i_size_dirty_but_clean,                         202,    FSCK_AUTOFIX)   \
+       x(inode_i_sectors_dirty_but_clean,                      203,    FSCK_AUTOFIX)   \
+       x(inode_i_sectors_wrong,                                204,    FSCK_AUTOFIX)   \
+       x(inode_dir_wrong_nlink,                                205,    FSCK_AUTOFIX)   \
+       x(inode_dir_multiple_links,                             206,    FSCK_AUTOFIX)   \
+       x(inode_multiple_links_but_nlink_0,                     207,    FSCK_AUTOFIX)   \
+       x(inode_wrong_backpointer,                              208,    FSCK_AUTOFIX)   \
+       x(inode_wrong_nlink,                                    209,    FSCK_AUTOFIX)   \
+       x(inode_unreachable,                                    210,    FSCK_AUTOFIX)   \
+       x(deleted_inode_but_clean,                              211,    FSCK_AUTOFIX)   \
+       x(deleted_inode_missing,                                212,    FSCK_AUTOFIX)   \
+       x(deleted_inode_is_dir,                                 213,    FSCK_AUTOFIX)   \
+       x(deleted_inode_not_unlinked,                           214,    FSCK_AUTOFIX)   \
        x(extent_overlapping,                                   215,    0)              \
        x(key_in_missing_inode,                                 216,    0)              \
        x(key_in_wrong_inode_type,                              217,    0)              \
@@ -255,7 +255,7 @@ enum bch_fsck_flags {
        x(dir_loop,                                             241,    0)              \
        x(hash_table_key_duplicate,                             242,    0)              \
        x(hash_table_key_wrong_offset,                          243,    0)              \
-       x(unlinked_inode_not_on_deleted_list,                   244,    0)              \
+       x(unlinked_inode_not_on_deleted_list,                   244,    FSCK_AUTOFIX)   \
        x(reflink_p_front_pad_bad,                              245,    0)              \
        x(journal_entry_dup_same_device,                        246,    0)              \
        x(inode_bi_subvol_missing,                              247,    0)              \
@@ -282,8 +282,8 @@ enum bch_fsck_flags {
        x(btree_ptr_v2_written_0,                               268,    0)              \
        x(subvol_snapshot_bad,                                  269,    0)              \
        x(subvol_inode_bad,                                     270,    0)              \
-       x(alloc_key_stripe_sectors_wrong,                       271,    0)              \
-       x(accounting_mismatch,                                  272,    0)              \
+       x(alloc_key_stripe_sectors_wrong,                       271,    FSCK_AUTOFIX)   \
+       x(accounting_mismatch,                                  272,    FSCK_AUTOFIX)   \
        x(accounting_replicas_not_marked,                       273,    0)              \
        x(invalid_btree_id,                                     274,    0)              \
        x(alloc_key_io_time_bad,                                275,    0)              \