[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240213163930.GU6184@frogsfrogsfrogs>
Date: Tue, 13 Feb 2024 08:39:30 -0800
From: "Darrick J. Wong" <djwong@...nel.org>
To: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>
Cc: linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
mcgrof@...nel.org, gost.dev@...sung.com, akpm@...ux-foundation.org,
kbusch@...nel.org, chandan.babu@...cle.com, p.raghav@...sung.com,
linux-kernel@...r.kernel.org, hare@...e.de, willy@...radead.org,
linux-mm@...ck.org, david@...morbit.com
Subject: Re: [RFC v2 13/14] xfs: add an experimental CONFIG_XFS_LBS option
On Tue, Feb 13, 2024 at 10:37:12AM +0100, Pankaj Raghav (Samsung) wrote:
> From: Pankaj Raghav <p.raghav@...sung.com>
>
> Add an experimental CONFIG_XFS_LBS option to enable LBS support in XFS.
> Retain the ASSERT for PAGE_SHIFT if CONFIG_XFS_LBS is not enabled.
>
> Signed-off-by: Pankaj Raghav <p.raghav@...sung.com>
With the changes I suggested in the next patch,
Reviewed-by: Darrick J. Wong <djwong@...nel.org>
(I think you ought to combine this patch and the next patch after
improving the EXPERIMENTAL log messaging.)
--D
> ---
> fs/xfs/Kconfig | 11 +++++++++++
> fs/xfs/xfs_mount.c | 4 +++-
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/fs/xfs/Kconfig b/fs/xfs/Kconfig
> index 567fb37274d3..6b0db2f7dc13 100644
> --- a/fs/xfs/Kconfig
> +++ b/fs/xfs/Kconfig
> @@ -216,3 +216,14 @@ config XFS_ASSERT_FATAL
> result in warnings.
>
> This behavior can be modified at runtime via sysfs.
> +
> +config XFS_LBS
> + bool "XFS large block size support (EXPERIMENTAL)"
> + depends on XFS_FS
> + help
> + Set Y to enable support for filesystem block size > system's
> + base page size.
> +
> + This feature is considered EXPERIMENTAL. Use with caution!
> +
> + If unsure, say N.
> diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
> index bfbaaecaf668..596aa2cdefbc 100644
> --- a/fs/xfs/xfs_mount.c
> +++ b/fs/xfs/xfs_mount.c
> @@ -131,11 +131,13 @@ xfs_sb_validate_fsb_count(
> xfs_sb_t *sbp,
> uint64_t nblocks)
> {
> - ASSERT(PAGE_SHIFT >= sbp->sb_blocklog);
> ASSERT(sbp->sb_blocklog >= BBSHIFT);
> unsigned long mapping_count;
> uint64_t bytes = nblocks << sbp->sb_blocklog;
>
> + if (!IS_ENABLED(CONFIG_XFS_LBS))
> + ASSERT(PAGE_SHIFT >= sbp->sb_blocklog);
> +
> mapping_count = bytes >> PAGE_SHIFT;
>
> /* Limited by ULONG_MAX of page cache index */
> --
> 2.43.0
>
>
Powered by blists - more mailing lists