linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] btrfs: Deprecate unused super block member, log_root_transid
@ 2018-10-12  6:37 Qu Wenruo
  2018-10-12  6:52 ` Nikolay Borisov
  0 siblings, 1 reply; 3+ messages in thread
From: Qu Wenruo @ 2018-10-12  6:37 UTC (permalink / raw)
  To: linux-btrfs

The member log_root_transid is never used.
It's always kept untouched even when updating log tree root.

And populating it without introducing new incompat flags could easily
cause back-compatibility problems.
So just mark it unused.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
changelog:
v2:
  Remove the redundant comment.
---
 fs/btrfs/ctree.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 53af9f5253f4..7adf5f4dcda4 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -214,8 +214,7 @@ struct btrfs_super_block {
 	__le64 chunk_root;
 	__le64 log_root;
 
-	/* this will help find the new super based on the log root */
-	__le64 log_root_transid;
+	__le64 __unused_log_root_transid;
 	__le64 total_bytes;
 	__le64 bytes_used;
 	__le64 root_dir_objectid;
@@ -2317,8 +2316,6 @@ BTRFS_SETGET_STACK_FUNCS(super_chunk_root_level, struct btrfs_super_block,
 			 chunk_root_level, 8);
 BTRFS_SETGET_STACK_FUNCS(super_log_root, struct btrfs_super_block,
 			 log_root, 64);
-BTRFS_SETGET_STACK_FUNCS(super_log_root_transid, struct btrfs_super_block,
-			 log_root_transid, 64);
 BTRFS_SETGET_STACK_FUNCS(super_log_root_level, struct btrfs_super_block,
 			 log_root_level, 8);
 BTRFS_SETGET_STACK_FUNCS(super_total_bytes, struct btrfs_super_block,
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] btrfs: Deprecate unused super block member, log_root_transid
  2018-10-12  6:37 [PATCH v2] btrfs: Deprecate unused super block member, log_root_transid Qu Wenruo
@ 2018-10-12  6:52 ` Nikolay Borisov
  2018-10-12  8:45   ` Qu Wenruo
  0 siblings, 1 reply; 3+ messages in thread
From: Nikolay Borisov @ 2018-10-12  6:52 UTC (permalink / raw)
  To: Qu Wenruo, linux-btrfs



On 12.10.2018 09:37, Qu Wenruo wrote:
> The member log_root_transid is never used.
> It's always kept untouched even when updating log tree root.
> 
> And populating it without introducing new incompat flags could easily
> cause back-compatibility problems.
> So just mark it unused.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> changelog:
> v2:
>   Remove the redundant comment.
> ---
>  fs/btrfs/ctree.h | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 53af9f5253f4..7adf5f4dcda4 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -214,8 +214,7 @@ struct btrfs_super_block {
>  	__le64 chunk_root;
>  	__le64 log_root;
>  
> -	/* this will help find the new super based on the log root */
> -	__le64 log_root_transid;
> +	__le64 __unused_log_root_transid;

why do you keep insisting on having "log_root_transid" in the name of
this member? It was never used on-disk so for all intents and purposes
log_root_transid doesn't mean anything? No need to resend, I'm sure
David will change it on commit, nut I'm just curious.


>  	__le64 total_bytes;
>  	__le64 bytes_used;
>  	__le64 root_dir_objectid;
> @@ -2317,8 +2316,6 @@ BTRFS_SETGET_STACK_FUNCS(super_chunk_root_level, struct btrfs_super_block,
>  			 chunk_root_level, 8);
>  BTRFS_SETGET_STACK_FUNCS(super_log_root, struct btrfs_super_block,
>  			 log_root, 64);
> -BTRFS_SETGET_STACK_FUNCS(super_log_root_transid, struct btrfs_super_block,
> -			 log_root_transid, 64);
>  BTRFS_SETGET_STACK_FUNCS(super_log_root_level, struct btrfs_super_block,
>  			 log_root_level, 8);
>  BTRFS_SETGET_STACK_FUNCS(super_total_bytes, struct btrfs_super_block,
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] btrfs: Deprecate unused super block member, log_root_transid
  2018-10-12  6:52 ` Nikolay Borisov
@ 2018-10-12  8:45   ` Qu Wenruo
  0 siblings, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2018-10-12  8:45 UTC (permalink / raw)
  To: Nikolay Borisov, Qu Wenruo, linux-btrfs



On 2018/10/12 下午2:52, Nikolay Borisov wrote:
> 
> 
> On 12.10.2018 09:37, Qu Wenruo wrote:
>> The member log_root_transid is never used.
>> It's always kept untouched even when updating log tree root.
>>
>> And populating it without introducing new incompat flags could easily
>> cause back-compatibility problems.
>> So just mark it unused.
>>
>> Signed-off-by: Qu Wenruo <wqu@suse.com>
>> ---
>> changelog:
>> v2:
>>   Remove the redundant comment.
>> ---
>>  fs/btrfs/ctree.h | 5 +----
>>  1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
>> index 53af9f5253f4..7adf5f4dcda4 100644
>> --- a/fs/btrfs/ctree.h
>> +++ b/fs/btrfs/ctree.h
>> @@ -214,8 +214,7 @@ struct btrfs_super_block {
>>  	__le64 chunk_root;
>>  	__le64 log_root;
>>  
>> -	/* this will help find the new super based on the log root */
>> -	__le64 log_root_transid;
>> +	__le64 __unused_log_root_transid;
> 
> why do you keep insisting on having "log_root_transid" in the name of
> this member? It was never used on-disk so for all intents and purposes
> log_root_transid doesn't mean anything? No need to resend, I'm sure
> David will change it on commit, nut I'm just curious.

We have a similar case, leaf_size.
Although it differs from this case and it's still used, I prefer to have
something showing that we at least planned to use this member.

Just in case one day we tries to use it again.

Thanks,
Qu

> 
> 
>>  	__le64 total_bytes;
>>  	__le64 bytes_used;
>>  	__le64 root_dir_objectid;
>> @@ -2317,8 +2316,6 @@ BTRFS_SETGET_STACK_FUNCS(super_chunk_root_level, struct btrfs_super_block,
>>  			 chunk_root_level, 8);
>>  BTRFS_SETGET_STACK_FUNCS(super_log_root, struct btrfs_super_block,
>>  			 log_root, 64);
>> -BTRFS_SETGET_STACK_FUNCS(super_log_root_transid, struct btrfs_super_block,
>> -			 log_root_transid, 64);
>>  BTRFS_SETGET_STACK_FUNCS(super_log_root_level, struct btrfs_super_block,
>>  			 log_root_level, 8);
>>  BTRFS_SETGET_STACK_FUNCS(super_total_bytes, struct btrfs_super_block,
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-12  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-12  6:37 [PATCH v2] btrfs: Deprecate unused super block member, log_root_transid Qu Wenruo
2018-10-12  6:52 ` Nikolay Borisov
2018-10-12  8:45   ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).