Ryusuke Konishi d0fa404821 libnilfsgc: use 'size_t' for total reclaimable blocks calculation
In nilfs_xreclaim_segment(), the local variable 'reclaimable_blocks'
holds the sum of reclaimable blocks across multiple segments.  Using a
32-bit type for this variable imposes a local limit on the total count,
which is theoretically inappropriate even though handling requests
exceeding the 32-bit limit is practically rare.

Change the variable type to 'size_t' to avoid enforcing such a local
restriction and to use a type that is more natural for the
architecture.  Also, rename the variable to 'total_reclaimable_blocks'
to clarify that it represents a total count across segments.

Note that checks for overflow, especially on 32-bit architectures,
should be handled separately.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2026-01-24 12:59:59 +09:00
..