]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/bcachefs.h
Update bcachefs sources to ee560a3929 bcachefs: Print version, options earlier in...
[bcachefs-tools-debian] / libbcachefs / bcachefs.h
index 445d010c83b33f3672ed6f3006941985d1c77355..901b681332ecafe3d1f70e0db85450ba873bd0f9 100644 (file)
@@ -563,7 +563,6 @@ enum {
        BCH_FS_CLEAN_SHUTDOWN,
 
        /* fsck passes: */
-       BCH_FS_TOPOLOGY_REPAIR_DONE,
        BCH_FS_FSCK_DONE,
        BCH_FS_INITIAL_GC_UNFIXED,      /* kill when we enumerate fsck errors */
        BCH_FS_NEED_ANOTHER_GC,
@@ -666,6 +665,7 @@ enum bch_write_ref {
        x(stripes_read,                 PASS_ALWAYS)                                            \
        x(initialize_subvolumes,        0)                                                      \
        x(snapshots_read,               PASS_ALWAYS)                                            \
+       x(check_topology,               0)                                                      \
        x(check_allocations,            PASS_FSCK)                                              \
        x(set_may_go_rw,                PASS_ALWAYS|PASS_SILENT)                                \
        x(journal_replay,               PASS_ALWAYS)                                            \
@@ -677,11 +677,11 @@ enum bch_write_ref {
        x(check_alloc_to_lru_refs,      PASS_FSCK)                                              \
        x(fs_freespace_init,            PASS_ALWAYS|PASS_SILENT)                                \
        x(bucket_gens_init,             0)                                                      \
-       x(fs_upgrade_for_subvolumes,    0)                                                      \
        x(check_snapshot_trees,         PASS_FSCK)                                              \
        x(check_snapshots,              PASS_FSCK)                                              \
        x(check_subvols,                PASS_FSCK)                                              \
-       x(delete_dead_snapshots,        PASS_FSCK|PASS_UNCLEAN|PASS_SILENT)                     \
+       x(delete_dead_snapshots,        PASS_FSCK|PASS_UNCLEAN)                                 \
+       x(fs_upgrade_for_subvolumes,    0)                                                      \
        x(check_inodes,                 PASS_FSCK|PASS_UNCLEAN)                                 \
        x(check_extents,                PASS_FSCK)                                              \
        x(check_dirents,                PASS_FSCK)                                              \
@@ -1179,6 +1179,19 @@ static inline bool bch2_dev_exists2(const struct bch_fs *c, unsigned dev)
        return dev < c->sb.nr_devices && c->devs[dev];
 }
 
+/*
+ * For when we need to rewind recovery passes and run a pass we skipped:
+ */
+static inline int bch2_run_explicit_recovery_pass(struct bch_fs *c,
+                                                 enum bch_recovery_pass pass)
+{
+       BUG_ON(c->curr_recovery_pass < pass);
+
+       c->recovery_passes_explicit |= BIT_ULL(pass);
+       c->curr_recovery_pass = pass;
+       return -BCH_ERR_restart_recovery;
+}
+
 #define BKEY_PADDED_ONSTACK(key, pad)                          \
        struct { struct bkey_i key; __u64 key ## _pad[pad]; }