Re: [PATCH] btrfs: remove BTRFS_REF_LAST from btrfs_ref_type

From: Qu Wenruo
Date: Tue Apr 15 2025 - 05:17:33 EST




在 2025/4/15 18:26, 李扬韬 写道:
History please.

Did you mean change commit msg to below?

Commit b28b1f0ce44c ("btrfs: delayed-ref: Introduce better documented delayed ref structures") introduce BTRFS_REF_LAST but never use it,
So let's remove it.

It's the common practice to leave a last entry for sanity checks.

But since it's not utilized for anything, I'm fine to remove it.


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

IIRC, delayed ref belongs to the extent tree memory kv cache.

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

I'm just looking at this code.

Thx,
Yangtao