summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/sb-downgrade.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-29 15:25:07 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 11:47:07 -0500
commit84f1638795da1ff2084597de4251e9054f1ad728 (patch)
treee3624d44235472e8d3e170af4a53686cfa5a945f /fs/bcachefs/sb-downgrade.h
parent8b16413cda7c46d47f8071165b3071f8a9369199 (diff)
downloadlinux-84f1638795da1ff2084597de4251e9054f1ad728.tar.gz
linux-84f1638795da1ff2084597de4251e9054f1ad728.tar.bz2
linux-84f1638795da1ff2084597de4251e9054f1ad728.zip
bcachefs: bch_sb_field_downgrade
Add a new superblock section that contains a list of { minor version, recovery passes, errors_to_fix } that is - a list of recovery passes that must be run when downgrading past a given version, and a list of errors to silently fix. The upcoming disk accounting rewrite is not going to be fully compatible: we're going to have to regenerate accounting both when upgrading to the new version, and also from downgrading from the new version, since the new method of doing disk space accounting is a completely different architecture based on deltas, and synchronizing them for every jounal entry write to maintain compatibility is going to be too expensive and impractical. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sb-downgrade.h')
-rw-r--r--fs/bcachefs/sb-downgrade.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/bcachefs/sb-downgrade.h b/fs/bcachefs/sb-downgrade.h
new file mode 100644
index 000000000000..bc48fd2ca70e
--- /dev/null
+++ b/fs/bcachefs/sb-downgrade.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _BCACHEFS_SB_DOWNGRADE_H
+#define _BCACHEFS_SB_DOWNGRADE_H
+
+extern const struct bch_sb_field_ops bch_sb_field_ops_downgrade;
+
+int bch2_sb_downgrade_update(struct bch_fs *);
+void bch2_sb_set_downgrade(struct bch_fs *, unsigned, unsigned);
+
+#endif /* _BCACHEFS_SB_DOWNGRADE_H */