Re: [RFC v2 13/14] xfs: add an experimental CONFIG_XFS_LBS option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 13, 2024 at 10:37:12AM +0100, Pankaj Raghav (Samsung) wrote:
> From: Pankaj Raghav <p.raghav@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxxx>

With the changes I suggested in the next patch,
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

(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
> 
> 




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux