[PATCH] erofs-utils: mkfs: twist calculation of shared_xattr_id

Gao Xiang hsiangkao at linux.alibaba.com
Fri Jun 9 19:56:02 AEST 2023



On 2023/6/9 17:02, Jingbo Xu wrote:
> The on-disk format specifies that share xattr can be addressed by:
> 
>    xattr offset = xattr_blkaddr * block_size + 4 * shared_xattr_id
> 
> That is, the shared_xattr_id is calculated from the xattr offset
> (starting from xattr_blkaddr) divided by 4.  Make this semantics
> explicitly by calculating the divisor from 'sizeof(__le32)'.
> 
> It has no logic change.
> 
> Signed-off-by: Jingbo Xu <jefflexu at linux.alibaba.com>

Reviewed-by: Gao Xiang <hsiangkao at linux.alibaba.com>

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list