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 601ef0d52e ("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>
pull/1354/merge
Andreas Gruenbacher 2025-10-28 21:38:54 +00:00
parent 3a88edc165
commit 16c3197984
3 changed files with 0 additions and 22 deletions

View File

@ -817,20 +817,6 @@ static int gfs2_thaw_super(struct super_block *sb, enum freeze_holder who,
return error; 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 * statfs_slow_fill - fill in the sg for a given RG
* @rgd: the RG * @rgd: the RG

View File

@ -47,7 +47,6 @@ void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc,
void update_statfs(struct gfs2_sbd *sdp, struct buffer_head *m_bh); void update_statfs(struct gfs2_sbd *sdp, struct buffer_head *m_bh);
int gfs2_statfs_sync(struct super_block *sb, int type); int gfs2_statfs_sync(struct super_block *sb, int type);
void gfs2_freeze_func(struct work_struct *work); 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); void free_local_statfs_inodes(struct gfs2_sbd *sdp);
struct inode *find_local_statfs_inode(struct gfs2_sbd *sdp, struct inode *find_local_statfs_inode(struct gfs2_sbd *sdp,

View File

@ -131,8 +131,6 @@ static void do_withdraw(struct gfs2_sbd *sdp)
*/ */
clear_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags); clear_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags);
if (!sb_rdonly(sdp->sd_vfs)) { if (!sb_rdonly(sdp->sd_vfs)) {
bool locked = mutex_trylock(&sdp->sd_freeze_mutex);
wake_up(&sdp->sd_logd_waitq); wake_up(&sdp->sd_logd_waitq);
wake_up(&sdp->sd_quota_wait); wake_up(&sdp->sd_quota_wait);
@ -142,17 +140,12 @@ static void do_withdraw(struct gfs2_sbd *sdp)
sdp->sd_vfs->s_flags |= SB_RDONLY; 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 * Dequeue any pending non-system glock holders that can no
* longer be granted because the file system is withdrawn. * longer be granted because the file system is withdrawn.
*/ */
gfs2_withdraw_glocks(sdp); gfs2_withdraw_glocks(sdp);
} }
gfs2_thaw_freeze_initiator(sdp->sd_vfs);
} }
void gfs2_lm(struct gfs2_sbd *sdp, const char *fmt, ...) void gfs2_lm(struct gfs2_sbd *sdp, const char *fmt, ...)