mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-23 20:59:05 +00:00
0e79106c2f
The inline_block threshold used floor division (DEFAULT_INLINE_OBJECT_BUDGET / data_shards) while shard_file_size uses ceiling division (div_ceil). For EC 12:4 with 256KiB objects, this caused a 1-byte discrepancy: - inline_block = 262144 / 12 = 21845 (floor) - shard_file_size = 262144.div_ceil(12) = 21846 (ceil) - should_inline(21846, 12, false) = false (wrong!) Fix by using div_ceil for the inline_block calculation, so both sides use the same rounding and the inline path is correctly triggered. Co-authored-by: heihutu <heihutu@gmail.com>