Skip to contentSkip to conversation

btrfs: add missing BTRFS_SUPER_FLAG define

PATCH In review Anand Jain 2 participants 3 messages Jan 5, 2018 – Jan 8, 2018 Btrfs file system

lore
Share & tools
lore

Anand Jain

author
#0 lore raw

PATCH 1/1 btrfs: add missing BTRFS_SUPER_FLAG define

btrfs-progs uses additional two super flag bits. So just define that so that we know its been used.

---
The btrfs-progs commits (very old) introduced them,

commit 7cc792872a133cabc3467e6ccaf5a2c8ea9e5218
btrfs-progs: Add CHANGING_FSID super flag

commit 797a937e5dd8db0092add633a80f3cd698e182df
Btrfs-progs: Introduce metadump_v2

Appears that we need bit of support from the kernel side like failing to mount if CHANGING_FSID is set. And device mounted with metadump_v2 flag is kind of broken on the kernel side as of now, this patch does not fix those.

 include/uapi/linux/btrfs_tree.h | 2 ++
 1 file changed, 2 insertions(+)
include/uapi/linux/btrfs_tree.h +2 -0
index 6d6e5da51527..aff1356c2bb8 100644
@@ -456,6 +456,8 @@ 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)
 
 
 /*
Signature · 1 line
2.15.0
#1 lore raw
Quoted 10 lines · Anand Jain

btrfs-progs uses additional two super flag bits. So just define that so that we know its been used.

---
The btrfs-progs commits (very old) introduced them,

commit 7cc792872a133cabc3467e6ccaf5a2c8ea9e5218
btrfs-progs: Add CHANGING_FSID super flag

Quoted 7 lines

commit 797a937e5dd8db0092add633a80f3cd698e182df
Btrfs-progs: Introduce metadump_v2

Appears that we need bit of support from the kernel side like failing to mount if CHANGING_FSID is set. And device mounted with metadump_v2 flag is kind of broken on the kernel side as of now, this patch does not fix those.

Please add the code that uses the flags, at least the for the pending uuid change.

author
#2 lore raw
Quoted 14 lines · David Sterba
Quoted 13 lines · Anand Jain

btrfs-progs uses additional two super flag bits. So just define that so that we know its been used.

---
The btrfs-progs commits (very old) introduced them,

commit 7cc792872a133cabc3467e6ccaf5a2c8ea9e5218
btrfs-progs: Add CHANGING_FSID super flag

commit 797a937e5dd8db0092add633a80f3cd698e182df
Btrfs-progs: Introduce metadump_v2

Quoted 7 lines
Quoted 4 lines

Appears that we need bit of support from the kernel side like failing to mount if CHANGING_FSID is set. And device mounted with metadump_v2 flag is kind of broken on the kernel side as of now, this patch does not fix those.

Please add the code that uses the flags, at least the for the pending uuid change.

OK. I have sent them as a set.
[PATCH 1/2] btrfs: add missing BTRFS_SUPER_FLAG define [PATCH 2/2] btrfs: add support for SUPER_FLAG_CHANGING_FSID in btrfs.ko

Thanks, Anand