[PATCH] btrfs: remove BTRFS_REF_LAST from btrfs_ref_type

Yangtao Li posted 1 patch 9 months, 4 weeks ago
There is a newer version of this series
fs/btrfs/delayed-ref.h | 1 -
1 file changed, 1 deletion(-)
[PATCH] btrfs: remove BTRFS_REF_LAST from btrfs_ref_type
Posted by Yangtao Li 9 months, 4 weeks ago
It seems that it has never been used, so remove it.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/btrfs/delayed-ref.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/btrfs/delayed-ref.h b/fs/btrfs/delayed-ref.h
index f5ae880308d3..78cc23837610 100644
--- a/fs/btrfs/delayed-ref.h
+++ b/fs/btrfs/delayed-ref.h
@@ -262,7 +262,6 @@ enum btrfs_ref_type {
 	BTRFS_REF_NOT_SET,
 	BTRFS_REF_DATA,
 	BTRFS_REF_METADATA,
-	BTRFS_REF_LAST,
 } __packed;
 
 struct btrfs_ref {
-- 
2.39.0
Re: [PATCH] btrfs: remove BTRFS_REF_LAST from btrfs_ref_type
Posted by Qu Wenruo 9 months, 4 weeks ago

在 2025/4/15 18:08, Yangtao Li 写道:
> It seems that it has never been used, so remove it.

History please.

> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>   fs/btrfs/delayed-ref.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/fs/btrfs/delayed-ref.h b/fs/btrfs/delayed-ref.h
> index f5ae880308d3..78cc23837610 100644
> --- a/fs/btrfs/delayed-ref.h
> +++ b/fs/btrfs/delayed-ref.h
> @@ -262,7 +262,6 @@ enum btrfs_ref_type {
>   	BTRFS_REF_NOT_SET,
>   	BTRFS_REF_DATA,
>   	BTRFS_REF_METADATA,
> -	BTRFS_REF_LAST,

The _LAST or _NR suffix can be utilized to do sanity checks, and this is 
not part of the on-disk format.

And if this exposed by some automatic tools, please also mention it.

>   } __packed;
>   
>   struct btrfs_ref {