Re: [PATCH v2 3/3] fs:btrfs: Use the new global is_power_of_2_u64() helper

From: David Sterba

Date: Mon Aug 31 2026 - 16:29:46 EST


On Sun, Aug 30, 2026 at 06:33:17PM +0800, David Gow wrote:
> btrfs currently provides its own 64-bit safe version of
> is_power_of_2(), in order to handle 64-bit values on 32-bit systems.
>
> Since other subsystems also have similar helpers, a new implementation
> has been added to linux/log2.h. Use this instead of the btrfs-specific
> one.
>
> Signed-off-by: David Gow <david@xxxxxxxxxxxx>
> ---
>
> This basically just replaces a btrfs helper with the version in patch 1.
> It probably doesn't make sense for this series to go in via the btrfs
> tree, so it's probably worth either accepting the posssibility for a
> conflict, or sending this patch in separately after the first one lands.

Acked-by: David Sterba <dsterba@xxxxxxxx>

As this is library API cleanup, feel free to take it with the rest of
the series.