Message ID | 1529060762-4372-5-git-send-email-nborisov@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jun 15, 2018 at 02:06:00PM +0300, Nikolay Borisov wrote: > The RO_FREE_SPACE_TREE(_VALID) flags are required in order to be able > to open an FST filesystem in repair mode. Add them to > BTRFS_FEATURE_COMPAT_RO_SUPP. > > Signed-off-by: Nikolay Borisov <nborisov@suse.com> > --- > ctree.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/ctree.h b/ctree.h > index ade883fecbd6..ef05e8122982 100644 > --- a/ctree.h > +++ b/ctree.h > @@ -497,7 +497,9 @@ struct btrfs_super_block { > * added here until read-write support for the free space tree is implemented in > * btrfs-progs. > */ > -#define BTRFS_FEATURE_COMPAT_RO_SUPP 0ULL > +#define BTRFS_FEATURE_COMPAT_RO_SUPP \ > + (BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE | \ > + BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID) Have you tested whether btrfs-progs commands that modify the filesystem (e.g., btrfstune or btrfs fi label) work with this series? Because that is a requirement for claiming that we support this bit (at which point we can delete the comment above). Also, this needs to happen _after_ we hook up the free space tree with the extent tree. See here for some historical context: https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg57738.html
diff --git a/ctree.h b/ctree.h index ade883fecbd6..ef05e8122982 100644 --- a/ctree.h +++ b/ctree.h @@ -497,7 +497,9 @@ struct btrfs_super_block { * added here until read-write support for the free space tree is implemented in * btrfs-progs. */ -#define BTRFS_FEATURE_COMPAT_RO_SUPP 0ULL +#define BTRFS_FEATURE_COMPAT_RO_SUPP \ + (BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE | \ + BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID) #define BTRFS_FEATURE_INCOMPAT_SUPP \ (BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF | \
The RO_FREE_SPACE_TREE(_VALID) flags are required in order to be able to open an FST filesystem in repair mode. Add them to BTRFS_FEATURE_COMPAT_RO_SUPP. Signed-off-by: Nikolay Borisov <nborisov@suse.com> --- ctree.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)