Re: [PATCH 1/1] f2fs-tools: use atoll replace atoi to avoid data truncate

From: Chao Yu
Date: Mon Jun 17 2024 - 21:05:22 EST


On 2024/6/12 15:17, Xiuhong Wang wrote:
If input exceeds int range, data will be truncated, such as lseek:
unisoc:/data # ./f2fs_io lseek set 3221225000 file
returned offset=2147483647
The offset is truncated.

After patch:
unisoc:/data # ./f2fs_io lseek set 3221225000 file
returned offset=3221225000

Signed-off-by: Xiuhong Wang <xiuhong.wang@xxxxxxxxxx>
Signed-off-by: Zhiguo Niu <zhiguo.niu@xxxxxxxxxx>

Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,