[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240213093713.1753368-14-kernel@pankajraghav.com>
Date: Tue, 13 Feb 2024 10:37:12 +0100
From: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>
To: linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Cc: mcgrof@...nel.org,
gost.dev@...sung.com,
akpm@...ux-foundation.org,
kbusch@...nel.org,
djwong@...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: [RFC v2 13/14] xfs: add an experimental CONFIG_XFS_LBS option
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>
---
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