Re: [PATCH] rbd: check snap_count against RBD_MAX_SNAP_COUNT
From: Jens Axboe
Date: Mon Jun 01 2026 - 10:29:34 EST
On Fri, 29 May 2026 18:12:55 -0700, Rosen Penev wrote:
> snap_count is u32 but the comparison is against a SIZE_MAX-derived value
> (~2^61 on 64-bit), which clang flags as always false with
> -Wtautological-constant-out-of-range-compare.
>
> The proper check here should be that snap_count does not go over
> RBD_MAX_SNAP_COUNT.
>
> [...]
Applied, thanks!
[1/1] rbd: check snap_count against RBD_MAX_SNAP_COUNT
commit: 2e1b3f4c51ace14f67201bd2a92ca6312a3c3724
Best regards,
--
Jens Axboe