[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2afb5a8f-470d-3a4a-6ec0-de0325ebd7c8@paragon-software.com>
Date: Mon, 8 May 2023 16:52:06 +0400
From: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
To: Yangtao Li <frank.li@...o.com>, <jack@...e.com>,
<dushistov@...l.ru>, <brauner@...nel.org>, <ntfs3@...ts.linux.dev>
CC: <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] fs/ntfs3: use wrapper i_blocksize() in
ntfs_zero_range()
On 10.03.2023 07:08, Yangtao Li wrote:
> Convert to use i_blocksize() for readability.
>
> Signed-off-by: Yangtao Li <frank.li@...o.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.
Powered by blists - more mailing lists