From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: linux-xfs@vger.kernel.org, chandanrlinux@gmail.com, sandeen@redhat.com
Subject: [PATCH v2.2 2/3] xfs: make xfs_growfs_rt update secondary superblocks
Date: Thu, 8 Oct 2020 15:19:05 -0700 [thread overview]
Message-ID: <20201008221905.GR6540@magnolia> (raw)
In-Reply-To: <160216933700.313389.9746852330724569803.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
When we call growfs on the data device, we update the secondary
superblocks to reflect the updated filesystem geometry. We need to do
this for growfs on the realtime volume too, because a future xfs_repair
run could try to fix the filesystem using a backup superblock.
This was observed by the online superblock scrubbers while running
xfs/233. One can also trigger this by growing an rt volume, cycling the
mount, and creating new rt files.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
v2.2: don't update on error, don't fail to free memory on error
---
fs/xfs/xfs_rtalloc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 1c3969807fb9..f9119ba3e9d0 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -18,7 +18,7 @@
#include "xfs_trans_space.h"
#include "xfs_icache.h"
#include "xfs_rtalloc.h"
-
+#include "xfs_sb.h"
/*
* Read and return the summary information for a given extent size,
@@ -1102,7 +1102,13 @@ xfs_growfs_rt(
if (error)
break;
}
+ if (error)
+ goto out_free;
+ /* Update secondary superblocks now the physical grow has completed */
+ error = xfs_update_secondary_sbs(mp);
+
+out_free:
/*
* Free the fake mp structure.
*/
next prev parent reply other threads:[~2020-10-08 22:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-08 15:02 [PATCH v2 0/3] xfs: a couple of realtime growfs fixes Darrick J. Wong
2020-10-08 15:02 ` [PATCH 1/3] xfs: fix realtime bitmap/summary file truncation when growing rt volume Darrick J. Wong
2020-10-08 15:02 ` [PATCH 2/3] xfs: make xfs_growfs_rt update secondary superblocks Darrick J. Wong
2020-10-08 22:16 ` Darrick J. Wong
2020-10-08 22:19 ` Darrick J. Wong [this message]
2020-10-09 9:51 ` [PATCH v2.2 " Chandan Babu R
2020-10-09 15:21 ` Darrick J. Wong
2020-10-10 4:00 ` Chandan Babu R
2020-10-08 15:02 ` [PATCH 3/3] xfs: annotate grabbing the realtime bitmap/summary locks in growfs Darrick J. Wong
2020-10-08 15:05 ` [PATCH 4/3] xfstest: test running growfs on the realtime volume Darrick J. Wong
2020-10-09 10:05 ` Chandan Babu R
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=20201008221905.GR6540@magnolia \
--to=darrick.wong@oracle.com \
--cc=chandanrlinux@gmail.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).