From: Lukas Herbolt <lukas@herbolt.com>
To: hch@infradead.org, aalbersh@redhat.com, cem@kernel.org
Cc: linux-xfs@vger.kernel.org, Lukas Herbolt <lukas@herbolt.com>
Subject: [PATCH 1/1] mkfs.xfs fix sunit size on 512e and 4kN disks.
Date: Thu, 19 Feb 2026 12:44:09 +0100 [thread overview]
Message-ID: <20260219114405.31521-6-lukas@herbolt.com> (raw)
In-Reply-To: <20260219114405.31521-3-lukas@herbolt.com>
Creating of XFS on 4kN or 512e disk result in suboptimal LSU/LSUNIT.
As of now we check if the sectorsize is bigger than XLOG_HEADER_SIZE
and so we set lsu to blocksize. But we do not check the the size if
lsunit can be bigger to fit the disk geometry.
Signed-off-by: Lukas Herbolt <lukas@herbolt.com>
---
mkfs/xfs_mkfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index b34407725f76..1b6334e9adce 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -3647,7 +3647,7 @@ check_lsunit:
else if (cfg->lsectorsize > XLOG_HEADER_SIZE)
lsu = cfg->blocksize; /* lsunit matches filesystem block size */
- if (lsu) {
+ if (cli->lsu) {
/* verify if lsu is a multiple block size */
if (lsu % cfg->blocksize != 0) {
fprintf(stderr,
--
2.53.0
From 2771375662c9edce25d7268bc71cc6db35a0d5c7 Mon Sep 17 00:00:00 2001
From: Lukas Herbolt <lukas@herbolt.com>
Date: Fri, 26 Sep 2025 12:48:39 +0200
Subject: [PATCH 1/1] mkfs.xfs fix sunit size on 512e and 4kN disks.
Creating of XFS on 4kN or 512e disk result in suboptimal LSU/LSUNIT.
As of now we check if the sectorsize is bigger than XLOG_HEADER_SIZE
and so we set lsu to blocksize. But we do not check the the size if
lsunit can be bigger to fit the disk geometry.
Signed-off-by: Lukas Herbolt <lukas@herbolt.com>
---
mkfs/xfs_mkfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index b34407725f76..1b6334e9adce 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -3647,7 +3647,7 @@ check_lsunit:
else if (cfg->lsectorsize > XLOG_HEADER_SIZE)
lsu = cfg->blocksize; /* lsunit matches filesystem block size */
- if (lsu) {
+ if (cli->lsu) {
/* verify if lsu is a multiple block size */
if (lsu % cfg->blocksize != 0) {
fprintf(stderr,
--
2.53.0
next prev parent reply other threads:[~2026-02-19 11:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 11:44 [PATCH 0/1] mkfs.xfs fix sunit size on 512e and 4kN disks Lukas Herbolt
2026-02-19 11:44 ` Lukas Herbolt [this message]
2026-02-19 13:32 ` [PATCH 1/1] " Christoph Hellwig
2026-03-04 19:49 ` Darrick J. Wong
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=20260219114405.31521-6-lukas@herbolt.com \
--to=lukas@herbolt.com \
--cc=aalbersh@redhat.com \
--cc=cem@kernel.org \
--cc=hch@infradead.org \
--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