From: Wang Yugui <wangyugui@e16-tech.com>
To: linux-xfs@vger.kernel.org
Cc: Wang Yugui <wangyugui@e16-tech.com>
Subject: [ RFC ] xfs: 4K inode support
Date: Wed, 22 Apr 2026 07:05:15 +0800 [thread overview]
Message-ID: <20260421230515.2234-1-wangyugui@e16-tech.com> (raw)
In-Reply-To: <20260421094204.A743.409509F4@e16-tech.com>
use case for 4K inode
- simpler logic for 4Kn device, and less lock.
- better performance for directory with many files.
- maybe inline data support later.
TODO:
still crash in xfs_trans_read_buf_map() when mount a 4K inode xfs now.
---
fs/xfs/libxfs/xfs_format.h | 2 +-
fs/xfs/libxfs/xfs_metafile.c | 2 +-
fs/xfs/libxfs/xfs_sb.c | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
index 779dac59b1f3..84cce8d268e6 100644
--- a/fs/xfs/libxfs/xfs_format.h
+++ b/fs/xfs/libxfs/xfs_format.h
@@ -1079,7 +1079,7 @@ enum xfs_dinode_fmt {
* Inode minimum and maximum sizes.
*/
#define XFS_DINODE_MIN_LOG 8
-#define XFS_DINODE_MAX_LOG 11
+#define XFS_DINODE_MAX_LOG 12
#define XFS_DINODE_MIN_SIZE (1 << XFS_DINODE_MIN_LOG)
#define XFS_DINODE_MAX_SIZE (1 << XFS_DINODE_MAX_LOG)
diff --git a/fs/xfs/libxfs/xfs_metafile.c b/fs/xfs/libxfs/xfs_metafile.c
index cf239f862212..9db799576775 100644
--- a/fs/xfs/libxfs/xfs_metafile.c
+++ b/fs/xfs/libxfs/xfs_metafile.c
@@ -98,7 +98,7 @@ xfs_metafile_resv_can_cover(
* isn't critical unless there also isn't enough free space.
*/
return xfs_compare_freecounter(mp, XC_FREE_BLOCKS,
- rhs - mp->m_metafile_resv_avail, 2048) >= 0;
+ rhs - mp->m_metafile_resv_avail, 4096) >= 0;
}
/*
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
index 38d16fe1f6d8..39424a7c74df 100644
--- a/fs/xfs/libxfs/xfs_sb.c
+++ b/fs/xfs/libxfs/xfs_sb.c
@@ -734,6 +734,7 @@ xfs_validate_sb_common(
case 512:
case 1024:
case 2048:
+ case 4096:
break;
default:
xfs_warn(mp, "inode size of %d bytes not supported",
--
2.36.2
prev parent reply other threads:[~2026-04-21 23:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 1:42 4K inode support on 4Kn device Wang Yugui
2026-04-21 5:48 ` Carlos Maiolino
2026-04-21 23:01 ` [PATCH] xfsprogs: 4K inode support Wang Yugui
2026-04-21 23:05 ` Wang Yugui [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260421230515.2234-1-wangyugui@e16-tech.com \
--to=wangyugui@e16-tech.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox