]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: read-only mounts should grab the sd_freeze_gl glock
authorBob Peterson <rpeterso@redhat.com>
Thu, 25 Jun 2020 18:30:18 +0000 (13:30 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 3 Jul 2020 10:05:35 +0000 (12:05 +0200)
commitd03dc38e9d7611076da2e14831064df2223c6d68
treefa1b20d622489beff386d3942e31992148057213
parentfe68888df243ab16df4a95b2fbaddbc1415b976f
gfs2: read-only mounts should grab the sd_freeze_gl glock

Before this patch, only read-write mounts would grab the freeze
glock in read-only mode, as part of gfs2_make_fs_rw. So the freeze
glock was never initialized. That meant requests to freeze, which
request the glock in EX, were granted without any state transition.
That meant you could mount a gfs2 file system, which is currently
frozen on a different cluster node, in read-only mode.

This patch makes read-only mounts lock the freeze glock in SH mode,
which will block for file systems that are frozen on another node.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/ops_fstype.c