From: "Darrick J. Wong" <djwong@kernel.org>
To: Andrey Albershteyn <aalbersh@kernel.org>
Cc: linux-xfs@vger.kernel.org, hch@lst.de
Subject: [PATCH 1/2] mkfs,xfs_repair: don't pass a daddr as the flags argument
Date: Tue, 18 Feb 2025 20:08:13 -0800 [thread overview]
Message-ID: <20250219040813.GL21808@frogsfrogsfrogs> (raw)
From: Darrick J. Wong <djwong@kernel.org>
libxfs_buf_get_uncached doesn't take a daddr argument, so don't pass one
as the flags argument. Also take the opportunity to use
xfs_buf_set_daddr to set the actual disk address.
Cc: <linux-xfs@vger.kernel.org> # v6.13.0
Fixes: 0d7c490474e5e5 ("mkfs: format realtime groups")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
mkfs/xfs_mkfs.c | 5 ++---
repair/rt.c | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index f5556fcc4040ed..79ce68e96bd2a5 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -4989,15 +4989,14 @@ write_rtsb(
}
error = -libxfs_buf_get_uncached(mp->m_rtdev_targp,
- XFS_FSB_TO_BB(mp, 1), XFS_RTSB_DADDR,
- &rtsb_bp);
+ XFS_FSB_TO_BB(mp, 1), 0, &rtsb_bp);
if (error) {
fprintf(stderr,
_("%s: couldn't grab realtime superblock buffer\n"), progname);
exit(1);
}
- rtsb_bp->b_maps[0].bm_bn = XFS_RTSB_DADDR;
+ xfs_buf_set_daddr(rtsb_bp, XFS_RTSB_DADDR);
rtsb_bp->b_ops = &xfs_rtsb_buf_ops;
libxfs_update_rtsb(rtsb_bp, sb_bp);
diff --git a/repair/rt.c b/repair/rt.c
index 5ba04919bc3ccf..12cc9bb8a88aeb 100644
--- a/repair/rt.c
+++ b/repair/rt.c
@@ -616,12 +616,12 @@ rewrite_rtsb(
_("couldn't grab primary sb to update realtime sb\n"));
error = -libxfs_buf_get_uncached(mp->m_rtdev_targp,
- XFS_FSB_TO_BB(mp, 1), XFS_RTSB_DADDR, &rtsb_bp);
+ XFS_FSB_TO_BB(mp, 1), 0, &rtsb_bp);
if (error)
do_error(
_("couldn't grab realtime superblock\n"));
- rtsb_bp->b_maps[0].bm_bn = XFS_RTSB_DADDR;
+ xfs_buf_set_daddr(rtsb_bp, XFS_RTSB_DADDR);
rtsb_bp->b_ops = &xfs_rtsb_buf_ops;
libxfs_update_rtsb(rtsb_bp, sb_bp);
next reply other threads:[~2025-02-19 4:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 4:08 Darrick J. Wong [this message]
2025-02-19 4:08 ` [PATCH 2/2] xfs_db: obfuscate rt superblock label when metadumping Darrick J. Wong
2025-02-19 5:37 ` Christoph Hellwig
2025-02-19 5:37 ` [PATCH 1/2] mkfs,xfs_repair: don't pass a daddr as the flags argument Christoph Hellwig
2025-02-19 5:45 ` Darrick J. Wong
2025-02-19 5:48 ` Christoph Hellwig
2025-02-19 5:53 ` Darrick J. Wong
2025-02-19 5:46 ` [PATCH v1.1 " Darrick J. Wong
2025-02-19 5:49 ` Christoph Hellwig
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=20250219040813.GL21808@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=aalbersh@kernel.org \
--cc=hch@lst.de \
--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