Message ID | 20180108080421.17668-4-anand.jain@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 2018年01月08日 16:04, Anand Jain wrote: > Userland sets SUPER_FLAG_CHANGING_FSID and resets it only when changing > fsid is complete. Its not a good idea to mount the device anything in > between, so this patch fails the mount if SB SUPER_FLAG_CHANGING_FSID > is set. As we don't add SUPER_FLAG_CHANGING_FSID into > BTRFS_SUPER_FLAG_SUPP list, so mount will fail if SUPER_FLAG_CHANGING_FSID > is set in the user land. > > Signed-off-by: Anand Jain <anand.jain@oracle.com> > cc: wqu@suse.com Reviewed-by: Qu Wenruo <wqu@suse.com> Thanks, Qu > --- > include/uapi/linux/btrfs_tree.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h > index 38ab0e06259a..aff1356c2bb8 100644 > --- a/include/uapi/linux/btrfs_tree.h > +++ b/include/uapi/linux/btrfs_tree.h > @@ -457,6 +457,7 @@ struct btrfs_free_space_header { > #define BTRFS_SUPER_FLAG_SEEDING (1ULL << 32) > #define BTRFS_SUPER_FLAG_METADUMP (1ULL << 33) > #define BTRFS_SUPER_FLAG_METADUMP_V2 (1ULL << 34) > +#define BTRFS_SUPER_FLAG_CHANGING_FSID (1ULL << 35) > > > /* >
diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h index 38ab0e06259a..aff1356c2bb8 100644 --- a/include/uapi/linux/btrfs_tree.h +++ b/include/uapi/linux/btrfs_tree.h @@ -457,6 +457,7 @@ struct btrfs_free_space_header { #define BTRFS_SUPER_FLAG_SEEDING (1ULL << 32) #define BTRFS_SUPER_FLAG_METADUMP (1ULL << 33) #define BTRFS_SUPER_FLAG_METADUMP_V2 (1ULL << 34) +#define BTRFS_SUPER_FLAG_CHANGING_FSID (1ULL << 35) /*
Userland sets SUPER_FLAG_CHANGING_FSID and resets it only when changing fsid is complete. Its not a good idea to mount the device anything in between, so this patch fails the mount if SB SUPER_FLAG_CHANGING_FSID is set. As we don't add SUPER_FLAG_CHANGING_FSID into BTRFS_SUPER_FLAG_SUPP list, so mount will fail if SUPER_FLAG_CHANGING_FSID is set in the user land. Signed-off-by: Anand Jain <anand.jain@oracle.com> cc: wqu@suse.com --- include/uapi/linux/btrfs_tree.h | 1 + 1 file changed, 1 insertion(+)