Re: [PATCH v2] f2fs-tools: fix to match with the start_sector

From: Chao Yu
Date: Mon May 28 2018 - 03:12:18 EST


On 2018/5/7 10:15, Yunlong Song wrote:
> f2fs-tools uses ioctl BLKSSZGET to get sector_size, however, this ioctl
> will return a value which may be larger than 512 (according to the value
> of q->limits.logical_block_size), then this will be inconsistent with
> the start_sector, since start_sector is got from ioctl HDIO_GETGEO and
> is always in 512 size unit for a sector. To fix this problem, just
> change the sector_size to the default value when computing with
> start_sector. And fix sectors_per_blk as well.
>
> Signed-off-by: Yunlong Song <yunlong.song@xxxxxxxxxx>

Reviewed-by: Chao Yu <yuchao0@xxxxxxxxxx>

Thanks,