mirror of
https://github.com/nilfs-dev/nilfs-utils.git
synced 2026-01-26 13:43:15 +00:00
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>