[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0261de31-e98b-85cd-80de-96af5a76e15c@linux.alibaba.com>
Date: Thu, 9 Mar 2023 16:07:04 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Yue Hu <zbestahu@...il.com>, Yangtao Li <frank.li@...o.com>
Cc: chao@...nel.org, huyue2@...lpad.com, jefflexu@...ux.alibaba.com,
linux-erofs@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
xiang@...nel.org, zhangwen@...lpad.com
Subject: Re: erofs: use wrapper i_blocksize() in erofs_file_read_iter()
On 2023/3/9 15:37, Yue Hu wrote:
> On Thu, 9 Mar 2023 15:15:15 +0800
> Yangtao Li <frank.li@...o.com> wrote:
>
>>> @@ -380,7 +380,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
>>> if (bdev)
>>> blksize_mask = bdev_logical_block_size(bdev) - 1;
>>> else
>>> - blksize_mask = (1 << inode->i_blkbits) - 1;
>>> + blksize_mask = i_blocksize(inode) - 1;
>>
>> Since the mask is to be obtained here, is it more appropriate to use GENMASK(inode->i_blkbits - 1, 0)?
>
> It should be another change independently to this patch. rt?
I'd suggest that keep to use (i_blocksize(inode) - 1) here, for example:
https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git/tree/fs/gfs2/bmap.c#n963
Thanks,
Gao Xiang
>
>>
>> Thx,
>> Yangtao
Powered by blists - more mailing lists