Message ID | f9d3d5feee3ddd2ddf8484396b6e0642b7ff5f91.1685519856.git.anand.jain@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] btrfs-progs: add CHANGING_FSID_V2 to print-tree | expand |
On 2023/5/31 16:06, Anand Jain wrote: > Add the DEF_SUPER_FLAG_ENTRY for CHANGING_FSID_V2 to our btrfs-progs' > print-tree.c and to the BTRFS_SUPER_FLAG_SUPP, so the dump-super prints > the flag name instead of unknown. > > Before: > flags 0x1000000001 > ( WRITTEN | > unknown flag: 0x1000000000 ) > > After: > flags 0x1000000001 > ( WRITTEN | > CHANGING_FSID_V2 ) > > Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Thanks, Qu > --- > v2: Include CHANGING_FSID_V2 in BTRFS_SUPER_FLAG_SUPP now in this patch. > Update change log. > > kernel-shared/print-tree.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c > index aaaf58ae2e0f..0f7f7b72f96a 100644 > --- a/kernel-shared/print-tree.c > +++ b/kernel-shared/print-tree.c > @@ -1721,6 +1721,7 @@ static struct readable_flag_entry super_flags_array[] = { > DEF_HEADER_FLAG_ENTRY(WRITTEN), > DEF_HEADER_FLAG_ENTRY(RELOC), > DEF_SUPER_FLAG_ENTRY(CHANGING_FSID), > + DEF_SUPER_FLAG_ENTRY(CHANGING_FSID_V2), > DEF_SUPER_FLAG_ENTRY(SEEDING), > DEF_SUPER_FLAG_ENTRY(METADUMP), > DEF_SUPER_FLAG_ENTRY(METADUMP_V2) > @@ -1730,6 +1731,7 @@ static const int super_flags_num = ARRAY_SIZE(super_flags_array); > #define BTRFS_SUPER_FLAG_SUPP (BTRFS_HEADER_FLAG_WRITTEN |\ > BTRFS_HEADER_FLAG_RELOC |\ > BTRFS_SUPER_FLAG_CHANGING_FSID |\ > + BTRFS_SUPER_FLAG_CHANGING_FSID_V2 |\ > BTRFS_SUPER_FLAG_SEEDING |\ > BTRFS_SUPER_FLAG_METADUMP |\ > BTRFS_SUPER_FLAG_METADUMP_V2)
On Wed, May 31, 2023 at 04:06:14PM +0800, Anand Jain wrote: > Add the DEF_SUPER_FLAG_ENTRY for CHANGING_FSID_V2 to our btrfs-progs' > print-tree.c and to the BTRFS_SUPER_FLAG_SUPP, so the dump-super prints > the flag name instead of unknown. > > Before: > flags 0x1000000001 > ( WRITTEN | > unknown flag: 0x1000000000 ) > > After: > flags 0x1000000001 > ( WRITTEN | > CHANGING_FSID_V2 ) > > Signed-off-by: Anand Jain <anand.jain@oracle.com> > --- > v2: Include CHANGING_FSID_V2 in BTRFS_SUPER_FLAG_SUPP now in this patch. > Update change log. Replaced in devel, thanks.
diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c index aaaf58ae2e0f..0f7f7b72f96a 100644 --- a/kernel-shared/print-tree.c +++ b/kernel-shared/print-tree.c @@ -1721,6 +1721,7 @@ static struct readable_flag_entry super_flags_array[] = { DEF_HEADER_FLAG_ENTRY(WRITTEN), DEF_HEADER_FLAG_ENTRY(RELOC), DEF_SUPER_FLAG_ENTRY(CHANGING_FSID), + DEF_SUPER_FLAG_ENTRY(CHANGING_FSID_V2), DEF_SUPER_FLAG_ENTRY(SEEDING), DEF_SUPER_FLAG_ENTRY(METADUMP), DEF_SUPER_FLAG_ENTRY(METADUMP_V2) @@ -1730,6 +1731,7 @@ static const int super_flags_num = ARRAY_SIZE(super_flags_array); #define BTRFS_SUPER_FLAG_SUPP (BTRFS_HEADER_FLAG_WRITTEN |\ BTRFS_HEADER_FLAG_RELOC |\ BTRFS_SUPER_FLAG_CHANGING_FSID |\ + BTRFS_SUPER_FLAG_CHANGING_FSID_V2 |\ BTRFS_SUPER_FLAG_SEEDING |\ BTRFS_SUPER_FLAG_METADUMP |\ BTRFS_SUPER_FLAG_METADUMP_V2)
Add the DEF_SUPER_FLAG_ENTRY for CHANGING_FSID_V2 to our btrfs-progs' print-tree.c and to the BTRFS_SUPER_FLAG_SUPP, so the dump-super prints the flag name instead of unknown. Before: flags 0x1000000001 ( WRITTEN | unknown flag: 0x1000000000 ) After: flags 0x1000000001 ( WRITTEN | CHANGING_FSID_V2 ) Signed-off-by: Anand Jain <anand.jain@oracle.com> --- v2: Include CHANGING_FSID_V2 in BTRFS_SUPER_FLAG_SUPP now in this patch. Update change log. kernel-shared/print-tree.c | 2 ++ 1 file changed, 2 insertions(+)