Skip to content

Commit

Permalink
[GFS2] don't try to lockfs after shutdown
Browse files Browse the repository at this point in the history
If an fs has already been shut down, a lockfs callback should do nothing.
An fs that's been shut down can't acquire locks or do anything with
respect to the cluster.

Also, remove FIXME comment in withdraw function.  The missing bits of the
withdraw procedure are now all done by user space.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Feb 5, 2007
1 parent 62d0cfc commit c378051
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 1 addition & 7 deletions fs/gfs2/lm.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,9 @@ int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...)
vprintk(fmt, args);
va_end(args);

fs_err(sdp, "about to withdraw from the cluster\n");
fs_err(sdp, "about to withdraw this file system\n");
BUG_ON(sdp->sd_args.ar_debug);


fs_err(sdp, "waiting for outstanding I/O\n");

/* FIXME: suspend dm device so oustanding bio's complete
and all further io requests fail */

fs_err(sdp, "telling LM to withdraw\n");
gfs2_withdraw_lockproto(&sdp->sd_lockstruct);
fs_err(sdp, "withdrawn\n");
Expand Down
3 changes: 3 additions & 0 deletions fs/gfs2/ops_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ static void gfs2_write_super_lockfs(struct super_block *sb)
struct gfs2_sbd *sdp = sb->s_fs_info;
int error;

if (test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
return;

for (;;) {
error = gfs2_freeze_fs(sdp);
if (!error)
Expand Down

0 comments on commit c378051

Please sign in to comment.