Re: 回复: [PATCH] btrfs: remove BTRFS_REF_LAST from btrfs_ref_type

From: David Sterba
Date: Wed Apr 16 2025 - 15:18:27 EST


On Wed, Apr 16, 2025 at 01:25:34PM +0000, 李扬韬 wrote:
> > I think in this case it's ok to remove it, although I agree that we have the _LAST or _NR elsewhere. In btrfs_ref_type() tere's an assertion
>
> > ASSERT(ref->type == BTRFS_REF_DATA || ref->type == BTRFS_REF_METADATA);
>
> > which is validating the values. There's no enumeration or switch that could utilize the upper bound.
>
> Do I need to modify the submission information and resend this patch?

Yes please, the reasoning was missing from the original patch, we've
come to a conclusion in the discussion so this should be summarized in
v2.