public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: Yangtao Li <frank.li@vivo.com>, zbestahu@gmail.com
Cc: chao@kernel.org, huyue2@coolpad.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 15:36:58 +0800	[thread overview]
Message-ID: <bee8eb33-ec23-de1c-0340-b2cc290f4d1c@linux.alibaba.com> (raw)
In-Reply-To: <20230309071515.25675-1-frank.li@vivo.com>



On 3/9/23 3:15 PM, Yangtao Li 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)?


FYI it seems that GENMASK macro is widely used in driver and arch code
base, while it's rarely used in fs, except for f2fs.

-- 
Thanks,
Jingbo

  reply	other threads:[~2023-03-09  7:38 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 [this message]
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
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=bee8eb33-ec23-de1c-0340-b2cc290f4d1c@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=chao@kernel.org \
    --cc=frank.li@vivo.com \
    --cc=huyue2@coolpad.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