* [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree
@ 2023-05-30 10:15 Anand Jain
2023-05-30 12:37 ` David Sterba
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Anand Jain @ 2023-05-30 10:15 UTC (permalink / raw)
To: linux-btrfs
Add the DEF_SUPER_FLAG_ENTRY for CHANGING_FSID_V2 to our btrfs-progs'
print-tree.c, as it is currently missing in the dump-super output, which
was too confusing.
Before:
flags 0x1000000001
( WRITTEN )
After:
flags 0x1000000001
( WRITTEN |
CHANGING_FSID_V2 )
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
kernel-shared/print-tree.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c
index aaaf58ae2e0f..623f192aaefc 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)
--
2.31.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree
2023-05-30 10:15 [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree Anand Jain
@ 2023-05-30 12:37 ` David Sterba
2023-05-31 5:46 ` Anand Jain
2023-05-31 0:01 ` Qu Wenruo
2023-05-31 8:06 ` [PATCH v2] " Anand Jain
2 siblings, 1 reply; 10+ messages in thread
From: David Sterba @ 2023-05-30 12:37 UTC (permalink / raw)
To: Anand Jain; +Cc: linux-btrfs
On Tue, May 30, 2023 at 06:15:11PM +0800, Anand Jain wrote:
> Add the DEF_SUPER_FLAG_ENTRY for CHANGING_FSID_V2 to our btrfs-progs'
> print-tree.c, as it is currently missing in the dump-super output, which
> was too confusing.
>
> Before:
> flags 0x1000000001
> ( WRITTEN )
>
> After:
> flags 0x1000000001
> ( WRITTEN |
> CHANGING_FSID_V2 )
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> kernel-shared/print-tree.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c
> index aaaf58ae2e0f..623f192aaefc 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),
Should the flag be also added to BTRFS_SUPER_FLAG_SUPP? Currently all
the other SUPER_FLAGs are there.
> DEF_SUPER_FLAG_ENTRY(SEEDING),
> DEF_SUPER_FLAG_ENTRY(METADUMP),
> DEF_SUPER_FLAG_ENTRY(METADUMP_V2)
> --
> 2.31.1
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree
2023-05-30 12:37 ` David Sterba
@ 2023-05-31 5:46 ` Anand Jain
2023-05-31 11:00 ` David Sterba
0 siblings, 1 reply; 10+ messages in thread
From: Anand Jain @ 2023-05-31 5:46 UTC (permalink / raw)
To: dsterba; +Cc: linux-btrfs
On 30/05/2023 20:37, David Sterba wrote:
> On Tue, May 30, 2023 at 06:15:11PM +0800, Anand Jain wrote:
>> Add the DEF_SUPER_FLAG_ENTRY for CHANGING_FSID_V2 to our btrfs-progs'
>> print-tree.c, as it is currently missing in the dump-super output, which
>> was too confusing.
>>
>> Before:
>> flags 0x1000000001
>> ( WRITTEN )
>>
>> After:
>> flags 0x1000000001
>> ( WRITTEN |
>> CHANGING_FSID_V2 )
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>> ---
>> kernel-shared/print-tree.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c
>> index aaaf58ae2e0f..623f192aaefc 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),
>
> Should the flag be also added to BTRFS_SUPER_FLAG_SUPP? Currently all
> the other SUPER_FLAGs are there.
I have the patch locally and need to confirm a few things before sending
it, which can be a separate patch.
Thanks, Anand
>
>> DEF_SUPER_FLAG_ENTRY(SEEDING),
>> DEF_SUPER_FLAG_ENTRY(METADUMP),
>> DEF_SUPER_FLAG_ENTRY(METADUMP_V2)
>> --
>> 2.31.1
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree
2023-05-31 5:46 ` Anand Jain
@ 2023-05-31 11:00 ` David Sterba
0 siblings, 0 replies; 10+ messages in thread
From: David Sterba @ 2023-05-31 11:00 UTC (permalink / raw)
To: Anand Jain; +Cc: linux-btrfs
On Wed, May 31, 2023 at 01:46:31PM +0800, Anand Jain wrote:
> On 30/05/2023 20:37, David Sterba wrote:
> > On Tue, May 30, 2023 at 06:15:11PM +0800, Anand Jain wrote:
> >> Add the DEF_SUPER_FLAG_ENTRY for CHANGING_FSID_V2 to our btrfs-progs'
> >> print-tree.c, as it is currently missing in the dump-super output, which
> >> was too confusing.
> >>
> >> Before:
> >> flags 0x1000000001
> >> ( WRITTEN )
> >>
> >> After:
> >> flags 0x1000000001
> >> ( WRITTEN |
> >> CHANGING_FSID_V2 )
> >>
> >> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> >> ---
> >> kernel-shared/print-tree.c | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c
> >> index aaaf58ae2e0f..623f192aaefc 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),
> >
> > Should the flag be also added to BTRFS_SUPER_FLAG_SUPP? Currently all
> > the other SUPER_FLAGs are there.
>
> I have the patch locally and need to confirm a few things before sending
> it, which can be a separate patch.
OK, so this one was added to devel, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree
2023-05-30 10:15 [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree Anand Jain
2023-05-30 12:37 ` David Sterba
@ 2023-05-31 0:01 ` Qu Wenruo
2023-05-31 2:08 ` Qu Wenruo
2023-05-31 8:06 ` [PATCH v2] " Anand Jain
2 siblings, 1 reply; 10+ messages in thread
From: Qu Wenruo @ 2023-05-31 0:01 UTC (permalink / raw)
To: Anand Jain, linux-btrfs
On 2023/5/30 18:15, Anand Jain wrote:
> Add the DEF_SUPER_FLAG_ENTRY for CHANGING_FSID_V2 to our btrfs-progs'
> print-tree.c, as it is currently missing in the dump-super output, which
> was too confusing.
>
> Before:
> flags 0x1000000001
> ( WRITTEN )
>
> After:
> flags 0x1000000001
> ( WRITTEN |
> CHANGING_FSID_V2 )
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
The patch itself looks fine.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> kernel-shared/print-tree.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c
> index aaaf58ae2e0f..623f192aaefc 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)
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree
2023-05-31 0:01 ` Qu Wenruo
@ 2023-05-31 2:08 ` Qu Wenruo
2023-05-31 7:56 ` Anand Jain
0 siblings, 1 reply; 10+ messages in thread
From: Qu Wenruo @ 2023-05-31 2:08 UTC (permalink / raw)
To: Anand Jain, linux-btrfs
On 2023/5/31 08:01, Qu Wenruo wrote:
>
>
> On 2023/5/30 18:15, Anand Jain wrote:
>> Add the DEF_SUPER_FLAG_ENTRY for CHANGING_FSID_V2 to our btrfs-progs'
>> print-tree.c, as it is currently missing in the dump-super output, which
>> was too confusing.
>>
>> Before:
>> flags 0x1000000001
>> ( WRITTEN )
But my concern is, why we didn't show something like " | Unknown flags
..." in the first place?
Isn't this a bug already?
Thanks,
Qu
>>
>> After:
>> flags 0x1000000001
>> ( WRITTEN |
>> CHANGING_FSID_V2 )
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>
> The patch itself looks fine.
>
> Reviewed-by: Qu Wenruo <wqu@suse.com>
>
> Thanks,
> Qu
>> ---
>> kernel-shared/print-tree.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c
>> index aaaf58ae2e0f..623f192aaefc 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)
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree
2023-05-31 2:08 ` Qu Wenruo
@ 2023-05-31 7:56 ` Anand Jain
0 siblings, 0 replies; 10+ messages in thread
From: Anand Jain @ 2023-05-31 7:56 UTC (permalink / raw)
To: Qu Wenruo, linux-btrfs
On 31/05/2023 10:08, Qu Wenruo wrote:
>
>
> On 2023/5/31 08:01, Qu Wenruo wrote:
>>
>>
>> On 2023/5/30 18:15, Anand Jain wrote:
>>> Add the DEF_SUPER_FLAG_ENTRY for CHANGING_FSID_V2 to our btrfs-progs'
>>> print-tree.c, as it is currently missing in the dump-super output, which
>>> was too confusing.
>>>
>>> Before:
>>> flags 0x1000000001
>>> ( WRITTEN )
>
> But my concern is, why we didn't show something like " | Unknown flags
> ..." in the first place?
>
> Isn't this a bug already?
>
My apologies. I have the patch that adds CHANGING_FSID_V2 to
BTRFS_SUPER_FLAG_SUPP, preventing the "unknown" flag from being printed.
And now, without it, both "unknown" and CHANGING_FSID_V2 are printed.
The CHANGING_FSID_V2 flag in BTRFS_SUPER_FLAG_SUPP flag in fine.
It has passed the btrfs-progs misc-test 034 testcase. I will
include this in V2.
Thanks, Anand
> Thanks,
> Qu
>>>
>>> After:
>>> flags 0x1000000001
>>> ( WRITTEN |
>>> CHANGING_FSID_V2 )
>>>
>>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>>
>> The patch itself looks fine.
>>
>> Reviewed-by: Qu Wenruo <wqu@suse.com>
>>
>> Thanks,
>> Qu
>>> ---
>>> kernel-shared/print-tree.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c
>>> index aaaf58ae2e0f..623f192aaefc 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)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] btrfs-progs: add CHANGING_FSID_V2 to print-tree
2023-05-30 10:15 [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree Anand Jain
2023-05-30 12:37 ` David Sterba
2023-05-31 0:01 ` Qu Wenruo
@ 2023-05-31 8:06 ` Anand Jain
2023-05-31 8:15 ` Qu Wenruo
2023-05-31 23:42 ` David Sterba
2 siblings, 2 replies; 10+ messages in thread
From: Anand Jain @ 2023-05-31 8:06 UTC (permalink / raw)
To: linux-btrfs
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(+)
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)
--
2.38.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2] btrfs-progs: add CHANGING_FSID_V2 to print-tree
2023-05-31 8:06 ` [PATCH v2] " Anand Jain
@ 2023-05-31 8:15 ` Qu Wenruo
2023-05-31 23:42 ` David Sterba
1 sibling, 0 replies; 10+ messages in thread
From: Qu Wenruo @ 2023-05-31 8:15 UTC (permalink / raw)
To: Anand Jain, linux-btrfs
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)
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2] btrfs-progs: add CHANGING_FSID_V2 to print-tree
2023-05-31 8:06 ` [PATCH v2] " Anand Jain
2023-05-31 8:15 ` Qu Wenruo
@ 2023-05-31 23:42 ` David Sterba
1 sibling, 0 replies; 10+ messages in thread
From: David Sterba @ 2023-05-31 23:42 UTC (permalink / raw)
To: Anand Jain; +Cc: linux-btrfs
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-05-31 23:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-30 10:15 [PATCH] btrfs-progs: add CHANGING_FSID_V2 to print-tree Anand Jain
2023-05-30 12:37 ` David Sterba
2023-05-31 5:46 ` Anand Jain
2023-05-31 11:00 ` David Sterba
2023-05-31 0:01 ` Qu Wenruo
2023-05-31 2:08 ` Qu Wenruo
2023-05-31 7:56 ` Anand Jain
2023-05-31 8:06 ` [PATCH v2] " Anand Jain
2023-05-31 8:15 ` Qu Wenruo
2023-05-31 23:42 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox