public inbox for ntfs3@lists.linux.dev
 help / color / mirror / Atom feed
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: Yangtao Li <frank.li@vivo.com>, <jack@suse.com>,
	<dushistov@mail.ru>, <brauner@kernel.org>,
	<ntfs3@lists.linux.dev>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] fs/ntfs3: use wrapper i_blocksize() in ntfs_zero_range()
Date: Mon, 8 May 2023 16:52:06 +0400	[thread overview]
Message-ID: <2afb5a8f-470d-3a4a-6ec0-de0325ebd7c8@paragon-software.com> (raw)
In-Reply-To: <20230310030821.66090-1-frank.li@vivo.com>

On 10.03.2023 07:08, Yangtao Li wrote:
> Convert to use i_blocksize() for readability.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>   fs/ntfs3/file.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
> index e9bdc1ff08c9..9d6ff29de441 100644
> --- a/fs/ntfs3/file.c
> +++ b/fs/ntfs3/file.c
> @@ -178,7 +178,7 @@ static int ntfs_zero_range(struct inode *inode, u64 vbo, u64 vbo_to)
>   {
>   	int err = 0;
>   	struct address_space *mapping = inode->i_mapping;
> -	u32 blocksize = 1 << inode->i_blkbits;
> +	u32 blocksize = i_blocksize(inode);
>   	pgoff_t idx = vbo >> PAGE_SHIFT;
>   	u32 from = vbo & (PAGE_SIZE - 1);
>   	pgoff_t idx_end = (vbo_to + PAGE_SIZE - 1) >> PAGE_SHIFT;
> @@ -192,7 +192,7 @@ static int ntfs_zero_range(struct inode *inode, u64 vbo, u64 vbo_to)
>   		page_off = (loff_t)idx << PAGE_SHIFT;
>   		to = (page_off + PAGE_SIZE) > vbo_to ? (vbo_to - page_off)
>   						     : PAGE_SIZE;
> -		iblock = page_off >> inode->i_blkbits;
> +		iblock = page_off / i_blocksize(inode);
>   
>   		page = find_or_create_page(mapping, idx,
>   					   mapping_gfp_constraint(mapping,
Thank you for the patch. We have partially accepted it due to 
performance concerns.

      parent reply	other threads:[~2023-05-08 12:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  3:08 [PATCH 1/3] fs/ntfs3: use wrapper i_blocksize() in ntfs_zero_range() Yangtao Li
2023-03-10  3:08 ` [PATCH 2/3] udf: use wrapper i_blocksize() in udf_discard_prealloc() Yangtao Li
2023-03-13 10:17   ` Jan Kara
2023-03-10  3:08 ` [PATCH 3/3] ufs: use wrapper i_blocksize() in ufs_get_locked_page() Yangtao Li
2023-03-10 13:18 ` [PATCH 1/3] fs/ntfs3: use wrapper i_blocksize() in ntfs_zero_range() kernel test robot
2023-03-10 14:30 ` kernel test robot
2023-05-08 12:52 ` Konstantin Komarov [this message]

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=2afb5a8f-470d-3a4a-6ec0-de0325ebd7c8@paragon-software.com \
    --to=almaz.alexandrovich@paragon-software.com \
    --cc=brauner@kernel.org \
    --cc=dushistov@mail.ru \
    --cc=frank.li@vivo.com \
    --cc=jack@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    /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