public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Yue Hu <zbestahu@gmail.com>, Yangtao Li <frank.li@vivo.com>
Cc: chao@kernel.org, huyue2@coolpad.com, jefflexu@linux.alibaba.com,
	linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	xiang@kernel.org, zhangwen@coolpad.com
Subject: Re: erofs: use wrapper i_blocksize() in erofs_file_read_iter()
Date: Thu, 9 Mar 2023 16:07:04 +0800	[thread overview]
Message-ID: <0261de31-e98b-85cd-80de-96af5a76e15c@linux.alibaba.com> (raw)
In-Reply-To: <20230309153709.00003876.zbestahu@gmail.com>



On 2023/3/9 15:37, Yue Hu wrote:
> On Thu,  9 Mar 2023 15:15:15 +0800
> Yangtao Li <frank.li@vivo.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

  reply	other threads:[~2023-03-09  8:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06  7:55 [PATCH] erofs: use wrapper i_blocksize() in erofs_file_read_iter() Yue Hu
2023-03-06 14:46 ` Gao Xiang
2023-03-09  7:15 ` Yangtao Li
2023-03-09  7:36   ` Jingbo Xu
2023-03-09  7:42     ` Yangtao Li
2023-03-09  8:09       ` Gao Xiang
2023-03-09  7:37   ` Yue Hu
2023-03-09  8:07     ` Gao Xiang [this message]
2023-03-09 14:33 ` [PATCH] " Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0261de31-e98b-85cd-80de-96af5a76e15c@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=chao@kernel.org \
    --cc=frank.li@vivo.com \
    --cc=huyue2@coolpad.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiang@kernel.org \
    --cc=zbestahu@gmail.com \
    --cc=zhangwen@coolpad.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox