summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/util.h
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2021-07-30 19:41:16 +0200
committerBob Peterson <rpeterso@redhat.com>2021-08-20 16:03:46 +0200
commit8cc67f704f4b61384343629feb1f1c30d64188c6 (patch)
tree74eb26f2977c055e89178426c35a2dc63b40bde7 /fs/gfs2/util.h
parentgfs2: Mark journal inodes as "don't cache" (diff)
downloadlinux-8cc67f704f4b61384343629feb1f1c30d64188c6.tar.xz
linux-8cc67f704f4b61384343629feb1f1c30d64188c6.zip
gfs2: don't stop reads while withdraw in progress
When gfs2 withdraws a file system, it calls signal_our_withdraw which triggers another node to replay the withdrawing node's journal. Then it waits until it knows the journal has been replayed. Part of this wait is to repeatedly call check_journal_clean which calls gfs2_jdesc_check, which checks to see if the journal is sane. As part of its sanity checks it needs to re-read its journal's metadata. But with today's code, any attempt to re-read the metadata results in -EIO because of a check for the file system withdraw in function gfs2_meta_wait. This patch adds an additional check for SDF_WITHDRAW_IN_PROG, to tell if the read is done while the withdraw is in progress. In that case we allow the metadata read to not be rejected. Therefore the metadata check is done properly, so the withdraw sequence can finish normally. Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/util.h')
-rw-r--r--fs/gfs2/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h
index 69e1a0ae5a4d..78ec190f4155 100644
--- a/fs/gfs2/util.h
+++ b/fs/gfs2/util.h
@@ -218,6 +218,11 @@ static inline bool gfs2_withdrawing(struct gfs2_sbd *sdp)
!test_bit(SDF_WITHDRAWN, &sdp->sd_flags);
}
+static inline bool gfs2_withdraw_in_prog(struct gfs2_sbd *sdp)
+{
+ return test_bit(SDF_WITHDRAW_IN_PROG, &sdp->sd_flags);
+}
+
#define gfs2_tune_get(sdp, field) \
gfs2_tune_get_i(&(sdp)->sd_tune, &(sdp)->sd_tune.field)