From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH] xfs: don't skip rtmount when there's a realtime device
Date: Wed, 12 Dec 2018 17:24:36 -0800 [thread overview]
Message-ID: <20181213012436.GB24487@magnolia> (raw)
From: Darrick J. Wong <darrick.wong@oracle.com>
Don't ever skip the realtime bitmap / summary inode initialization if
there's a realtime device attached, because we'd rather fail the mount
if iget declines to retrieve a NULL inode pointer. Right now, if
someone sets rbmino to NULLFSINO on a rt-capable filesystem, mounts it,
and writes a file to the rt device, we'll blow up.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/xfs/xfs_rtalloc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index aefd63d46397..18ad31ded0bf 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -1206,7 +1206,8 @@ xfs_rtmount_inodes(
xfs_sb_t *sbp;
sbp = &mp->m_sb;
- if (sbp->sb_rbmino == NULLFSINO)
+ if (!xfs_sb_version_hasrealtime(&mp->m_sb) &&
+ sbp->sb_rbmino == NULLFSINO)
return 0;
error = xfs_iget(mp, NULL, sbp->sb_rbmino, 0, 0, &mp->m_rbmip);
if (error)
next reply other threads:[~2018-12-13 1:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-13 1:24 Darrick J. Wong [this message]
2018-12-13 19:06 ` [PATCH] xfs: don't skip rtmount when there's a realtime device Bill O'Donnell
2018-12-13 21:29 ` Eric Sandeen
2018-12-13 23:46 ` 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=20181213012436.GB24487@magnolia \
--to=darrick.wong@oracle.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