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
601ef0d52e96 ("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>
return error;
}
-void gfs2_thaw_freeze_initiator(struct super_block *sb)
-{
- struct gfs2_sbd *sdp = sb->s_fs_info;
-
- mutex_lock(&sdp->sd_freeze_mutex);
- if (!test_bit(SDF_FREEZE_INITIATOR, &sdp->sd_flags))
- goto out;
-
- gfs2_freeze_unlock(sdp);
-
-out:
- mutex_unlock(&sdp->sd_freeze_mutex);
-}
-
/**
* statfs_slow_fill - fill in the sg for a given RG
* @rgd: the RG
void update_statfs(struct gfs2_sbd *sdp, struct buffer_head *m_bh);
int gfs2_statfs_sync(struct super_block *sb, int type);
void gfs2_freeze_func(struct work_struct *work);
-void gfs2_thaw_freeze_initiator(struct super_block *sb);
void free_local_statfs_inodes(struct gfs2_sbd *sdp);
struct inode *find_local_statfs_inode(struct gfs2_sbd *sdp,
*/
clear_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags);
if (!sb_rdonly(sdp->sd_vfs)) {
- bool locked = mutex_trylock(&sdp->sd_freeze_mutex);
-
wake_up(&sdp->sd_logd_waitq);
wake_up(&sdp->sd_quota_wait);
sdp->sd_vfs->s_flags |= SB_RDONLY;
- if (locked)
- mutex_unlock(&sdp->sd_freeze_mutex);
-
/*
* Dequeue any pending non-system glock holders that can no
* longer be granted because the file system is withdrawn.
*/
gfs2_withdraw_glocks(sdp);
}
-
- gfs2_thaw_freeze_initiator(sdp->sd_vfs);
}
void gfs2_lm(struct gfs2_sbd *sdp, const char *fmt, ...)