[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoIVhyNjgtkmvvBt@dread.disaster.area>
Date: Mon, 1 Jul 2024 12:33:43 +1000
From: Dave Chinner <david@...morbit.com>
To: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>
Cc: willy@...radead.org, chandan.babu@...cle.com, djwong@...nel.org,
brauner@...nel.org, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, yang@...amperecomputing.com,
linux-mm@...ck.org, john.g.garry@...cle.com,
linux-fsdevel@...r.kernel.org, hare@...e.de, p.raghav@...sung.com,
mcgrof@...nel.org, gost.dev@...sung.com, cl@...amperecomputing.com,
linux-xfs@...r.kernel.org, hch@....de, Zi Yan <zi.yan@...t.com>
Subject: Re: [PATCH v8 08/10] xfs: expose block size in stat
On Tue, Jun 25, 2024 at 11:44:18AM +0000, Pankaj Raghav (Samsung) wrote:
> From: Pankaj Raghav <p.raghav@...sung.com>
>
> For block size larger than page size, the unit of efficient IO is
> the block size, not the page size. Leaving stat() to report
> PAGE_SIZE as the block size causes test programs like fsx to issue
> illegal ranges for operations that require block size alignment
> (e.g. fallocate() insert range). Hence update the preferred IO size
> to reflect the block size in this case.
>
> This change is based on a patch originally from Dave Chinner.[1]
>
> [1] https://lwn.net/ml/linux-fsdevel/20181107063127.3902-16-david@fromorbit.com/
>
> Reviewed-by: Darrick J. Wong <djwong@...nel.org>
> Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
> Signed-off-by: Pankaj Raghav <p.raghav@...sung.com>
> ---
> fs/xfs/xfs_iops.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index a00dcbc77e12..da5c13150315 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -562,7 +562,7 @@ xfs_stat_blksize(
> return 1U << mp->m_allocsize_log;
> }
>
> - return PAGE_SIZE;
> + return max_t(uint32_t, PAGE_SIZE, mp->m_sb.sb_blocksize);
> }
Looks fine.
Reviewed-by: Dave Chinner <dchinner@...hat.com>
--
Dave Chinner
david@...morbit.com
Powered by blists - more mailing lists