Skip to content

Commit 16c3197

Browse files
author
Andreas Gruenbacher
committed
gfs2: No longer thaw filesystems during a withdraw
Previously, when a withdraw occurred, we would wait for another node to recover our journal. This also meant that frozen filesystem needed to be thawed because otherwise, other nodes wouldn't be able to recover the filesystem. With the reversal of commit 601ef0d ("gfs2: Force withdraw to replay journals and wait for it to finish"), we are no longer waiting for journal recovery during a withdraw, so we no longer need to thaw frozen filesystems, either. This also fixes a potential deadlock reported by lockdep when running xfstest generic/108. In addition, there is nothing left in do_withdraw() that would require taking sd_freeze_mutex, so don't bother taking that lock there anymore. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 3a88edc commit 16c3197

3 files changed

Lines changed: 0 additions & 22 deletions

File tree

fs/gfs2/super.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -817,20 +817,6 @@ static int gfs2_thaw_super(struct super_block *sb, enum freeze_holder who,
817817
return error;
818818
}
819819

820-
void gfs2_thaw_freeze_initiator(struct super_block *sb)
821-
{
822-
struct gfs2_sbd *sdp = sb->s_fs_info;
823-
824-
mutex_lock(&sdp->sd_freeze_mutex);
825-
if (!test_bit(SDF_FREEZE_INITIATOR, &sdp->sd_flags))
826-
goto out;
827-
828-
gfs2_freeze_unlock(sdp);
829-
830-
out:
831-
mutex_unlock(&sdp->sd_freeze_mutex);
832-
}
833-
834820
/**
835821
* statfs_slow_fill - fill in the sg for a given RG
836822
* @rgd: the RG

fs/gfs2/super.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc,
4747
void update_statfs(struct gfs2_sbd *sdp, struct buffer_head *m_bh);
4848
int gfs2_statfs_sync(struct super_block *sb, int type);
4949
void gfs2_freeze_func(struct work_struct *work);
50-
void gfs2_thaw_freeze_initiator(struct super_block *sb);
5150

5251
void free_local_statfs_inodes(struct gfs2_sbd *sdp);
5352
struct inode *find_local_statfs_inode(struct gfs2_sbd *sdp,

fs/gfs2/util.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ static void do_withdraw(struct gfs2_sbd *sdp)
131131
*/
132132
clear_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags);
133133
if (!sb_rdonly(sdp->sd_vfs)) {
134-
bool locked = mutex_trylock(&sdp->sd_freeze_mutex);
135-
136134
wake_up(&sdp->sd_logd_waitq);
137135
wake_up(&sdp->sd_quota_wait);
138136

@@ -142,17 +140,12 @@ static void do_withdraw(struct gfs2_sbd *sdp)
142140

143141
sdp->sd_vfs->s_flags |= SB_RDONLY;
144142

145-
if (locked)
146-
mutex_unlock(&sdp->sd_freeze_mutex);
147-
148143
/*
149144
* Dequeue any pending non-system glock holders that can no
150145
* longer be granted because the file system is withdrawn.
151146
*/
152147
gfs2_withdraw_glocks(sdp);
153148
}
154-
155-
gfs2_thaw_freeze_initiator(sdp->sd_vfs);
156149
}
157150

158151
void gfs2_lm(struct gfs2_sbd *sdp, const char *fmt, ...)

0 commit comments

Comments
 (0)