linux/fs/gfs2
Bob Peterson c5bcaacd06 gfs2: Don't demote a glock until its revokes are written
[ Upstream commit df5db5f9ee ]

Before this patch, run_queue would demote glocks based on whether
there are any more holders. But if the glock has pending revokes that
haven't been written to the media, giving up the glock might end in
file system corruption if the revokes never get written due to
io errors, node crashes and fences, etc. In that case, another node
will replay the metadata blocks associated with the glock, but
because the revoke was never written, it could replay that block
even though the glock had since been granted to another node who
might have made changes.

This patch changes the logic in run_queue so that it never demotes
a glock until its count of pending revokes reaches zero.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-17 10:50:03 +02:00
..
Kconfig
Makefile
acl.c
acl.h
aops.c
aops.h
bmap.c
bmap.h
dentry.c
dir.c
dir.h
export.c
file.c gfs2: fix O_SYNC write handling 2020-02-11 04:35:35 -08:00
gfs2.h
glock.c gfs2: Don't demote a glock until its revokes are written 2020-04-17 10:50:03 +02:00
glock.h
glops.c gfs2: Do log_flush in gfs2_ail_empty_gl even if ail list is empty 2020-04-17 10:50:03 +02:00
glops.h
incore.h
inode.c gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache 2020-03-18 07:17:51 +01:00
inode.h
lock_dlm.c
log.c gfs2: Do log_flush in gfs2_ail_empty_gl even if ail list is empty 2020-04-17 10:50:03 +02:00
log.h gfs2: Do log_flush in gfs2_ail_empty_gl even if ail list is empty 2020-04-17 10:50:03 +02:00
lops.c gfs2: fix gfs2_find_jhead that returns uninitialized jhead with seq 0 2020-02-11 04:35:35 -08:00
lops.h
main.c
meta_io.c
meta_io.h
ops_fstype.c
quota.c
quota.h
recovery.c
recovery.h
rgrp.c
rgrp.h
super.c
super.h
sys.c
sys.h
trace_gfs2.h
trans.c
trans.h
util.c
util.h
xattr.c
xattr.h