diff options
author | David Teigland <teigland@redhat.com> | 2012-05-01 16:50:48 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2012-05-02 15:19:12 -0400 |
commit | 1a058f5288a74a20d5567a85ab1a04a9de69a212 (patch) | |
tree | 8ed2428f8aaee127fc4a87417dd520a90f60e3a7 /fs/gfs2 | |
parent | 4875647a08e35f77274838d97ca8fa44158d50e2 (diff) |
gfs2: fix recovery during unmount
Journal recovery from lock_dlm should not be ignored
if there is an unmount in progress. Ignoring it will
causes the recovery to get stuck. The recovery
process will correctly handle an in-progess unmount.
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/sys.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index d33172c291ba..9c2592b1d5ff 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c | |||
@@ -368,10 +368,7 @@ int gfs2_recover_set(struct gfs2_sbd *sdp, unsigned jid) | |||
368 | struct gfs2_jdesc *jd; | 368 | struct gfs2_jdesc *jd; |
369 | int rv; | 369 | int rv; |
370 | 370 | ||
371 | rv = -ESHUTDOWN; | ||
372 | spin_lock(&sdp->sd_jindex_spin); | 371 | spin_lock(&sdp->sd_jindex_spin); |
373 | if (test_bit(SDF_NORECOVERY, &sdp->sd_flags)) | ||
374 | goto out; | ||
375 | rv = -EBUSY; | 372 | rv = -EBUSY; |
376 | if (sdp->sd_jdesc->jd_jid == jid) | 373 | if (sdp->sd_jdesc->jd_jid == jid) |
377 | goto out; | 374 | goto out; |
@@ -396,8 +393,13 @@ static ssize_t recover_store(struct gfs2_sbd *sdp, const char *buf, size_t len) | |||
396 | if (rv != 1) | 393 | if (rv != 1) |
397 | return -EINVAL; | 394 | return -EINVAL; |
398 | 395 | ||
399 | rv = gfs2_recover_set(sdp, jid); | 396 | if (test_bit(SDF_NORECOVERY, &sdp->sd_flags)) { |
397 | rv = -ESHUTDOWN; | ||
398 | goto out; | ||
399 | } | ||
400 | 400 | ||
401 | rv = gfs2_recover_set(sdp, jid); | ||
402 | out: | ||
401 | return rv ? rv : len; | 403 | return rv ? rv : len; |
402 | } | 404 | } |
403 | 405 | ||