diff mbox series

btrfs-progs: add CHANGING_FSID_V2 to print-tree

Message ID 8e152cd504552e92680290cd34bf30bfef0cc1aa.1685440589.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: add CHANGING_FSID_V2 to print-tree | expand

Commit Message

Anand Jain May 30, 2023, 10:15 a.m. UTC
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(+)

Comments

David Sterba May 30, 2023, 12:37 p.m. UTC | #1
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
Qu Wenruo May 31, 2023, 12:01 a.m. UTC | #2
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)
Qu Wenruo May 31, 2023, 2:08 a.m. UTC | #3
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)
Anand Jain May 31, 2023, 5:46 a.m. UTC | #4
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
Anand Jain May 31, 2023, 7:56 a.m. UTC | #5
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)
David Sterba May 31, 2023, 11 a.m. UTC | #6
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.
diff mbox series

Patch

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)