[PATCH v2 26/34] gfs2: don't set SB_RDONLY on withdraw

Christian Brauner brauner at kernel.org
Wed Nov 11 01:36:26 PST 2026


On Fri, Oct 30, 2026 at 04:10:10PM +0000, sashiko-bot at kernel.org wrote:
> which submits writes for those dirty resource group buffers to the block
> device without reaching gfs2_write_inode(). Should gfs2_aspace_writepages()
> also check gfs2_withdrawn(sdp)?

No. sd_inode comes from new_inode() and is never hashed so
__mark_inode_dirty() never puts it on a writeback list.
sync_filesystem() doesn't write it back.

> If a freeze is triggered via freeze_store() in fs/gfs2/sys.c or
> gfs2_freeze_func() in fs/gfs2/super.c (which call VFS freeze_super()
> directly rather than gfs2_freeze_super()), or if a withdraw completes during
> the msleep(1000) retry loop in gfs2_freeze_super() after the initial
> gfs2_withdrawn(sdp) check above, won't freeze_super() succeed on the
> withdrawn filesystem and leave s_writers locked? Should gfs2_freeze_fs()
> check gfs2_withdrawn(sdp) outside the SDF_JOURNAL_LIVE check?

freeze_super() succeeded on a withdrawn filesystem before as well via
the read-only shortcut. Now it takes s_writers and thaw_super()
releases them again because SB_RDONLY doesn't change in between. That's
the point of the patch. A withdraw during the retry loop makes
gfs2_lock_fs_check_clean() fail and the freeze is undone.

> When gfs2_lock_fs_check_clean(sdp) fails in gfs2_freeze_super(), doesn't
> calling gfs2_do_thaw() below re-initialize sdp->sd_freeze_gh while it is
> already queued and holding sdp->sd_freeze_gl in LM_ST_SHARED mode?

Pre-existing.



More information about the linux-mtd mailing list