diff options
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r-- | fs/bcachefs/bcachefs.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index 88a1782b2a0e..d8c020644f54 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -660,12 +660,11 @@ enum bch_write_ref { #define PASS_FSCK BIT(1) #define PASS_UNCLEAN BIT(2) #define PASS_ALWAYS BIT(3) -#define PASS_UPGRADE(v) ((v) << 4) #define BCH_RECOVERY_PASSES() \ x(alloc_read, PASS_ALWAYS) \ x(stripes_read, PASS_ALWAYS) \ - x(initialize_subvolumes, PASS_UPGRADE(bcachefs_metadata_version_snapshot_2)) \ + x(initialize_subvolumes, 0) \ x(snapshots_read, PASS_ALWAYS) \ x(check_allocations, PASS_FSCK) \ x(set_may_go_rw, PASS_ALWAYS|PASS_SILENT) \ @@ -677,8 +676,8 @@ enum bch_write_ref { x(check_extents_to_backpointers,PASS_FSCK) \ x(check_alloc_to_lru_refs, PASS_FSCK) \ x(fs_freespace_init, PASS_ALWAYS|PASS_SILENT) \ - x(bucket_gens_init, PASS_UPGRADE(bcachefs_metadata_version_bucket_gens)) \ - x(fs_upgrade_for_subvolumes, PASS_UPGRADE(bcachefs_metadata_version_snapshot_2)) \ + 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) \ @@ -690,7 +689,7 @@ enum bch_write_ref { x(check_root, PASS_FSCK) \ x(check_directory_structure, PASS_FSCK) \ x(check_nlinks, PASS_FSCK) \ - x(fix_reflink_p, PASS_UPGRADE(bcachefs_metadata_version_reflink_p_fix)) \ + x(fix_reflink_p, 0) \ enum bch_recovery_pass { #define x(n, when) BCH_RECOVERY_PASS_##n, @@ -1033,6 +1032,8 @@ struct bch_fs { u64 journal_replay_seq_start; u64 journal_replay_seq_end; enum bch_recovery_pass curr_recovery_pass; + /* bitmap of explicitly enabled recovery passes: */ + u64 recovery_passes_explicit; /* DEBUG JUNK */ struct dentry *fs_debug_dir; @@ -1177,12 +1178,6 @@ static inline bool bch2_dev_exists2(const struct bch_fs *c, unsigned dev) return dev < c->sb.nr_devices && c->devs[dev]; } -static inline bool bch2_version_upgrading_to(const struct bch_fs *c, unsigned new_version) -{ - return c->sb.version_upgrade_complete < new_version && - c->sb.version >= new_version; -} - #define BKEY_PADDED_ONSTACK(key, pad) \ struct { struct bkey_i key; __u64 key ## _pad[pad]; } |