linux-stable/fs/gfs2
Bob Peterson 790829dc62 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-24 08:00:27 +02:00
..
acl.c gfs2: preserve i_mode if __gfs2_set_acl() fails 2017-08-31 07:53:15 -05:00
acl.h
aops.c gfs2: forcibly flush ail to relieve memory pressure 2017-08-10 10:51:03 -05:00
bmap.c gfs2: take jdata unstuff into account in do_grow 2019-12-05 15:37:32 +01:00
bmap.h
dentry.c gfs2: Lock holder cleanup 2016-06-27 09:47:09 -05:00
dir.c We've got a whopping 29 GFS2 patches for this merge window, mainly 2017-09-06 11:42:31 -07:00
dir.h
export.c gfs2: Get rid of gfs2_ilookup 2016-06-27 09:47:08 -05:00
file.c gfs2: Fix fallocate chunk size 2018-05-30 07:52:35 +02:00
gfs2.h
glock.c gfs2: Don't demote a glock until its revokes are written 2020-04-24 08:00:27 +02:00
glock.h gfs2: gfs2_evict_inode: Put glocks asynchronously 2017-08-10 10:45:21 -05:00
glops.c Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 18:54:01 -07:00
glops.h
incore.h gfs2: Silence gcc format-truncation warning 2017-08-25 10:59:21 -05:00
inode.c gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache 2020-03-20 10:54:16 +01:00
inode.h GFS2: use BIT() macro 2016-08-02 12:05:27 -05:00
Kconfig
lock_dlm.c gfs2: Fix sign extension bug in gfs2_update_stats 2019-05-31 06:47:11 -07:00
log.c gfs2: fix glock reference problem in gfs2_trans_remove_revoke 2019-12-17 20:40:01 +01:00
log.h gfs2: fix glock reference problem in gfs2_trans_remove_revoke 2019-12-17 20:40:01 +01:00
lops.c gfs2: fix glock reference problem in gfs2_trans_remove_revoke 2019-12-17 20:40:01 +01:00
lops.h gfs2: use bio op accessors 2016-06-07 13:41:38 -06:00
main.c GFS2: Remove gl_list from glock structure 2017-06-12 14:39:12 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
meta_io.c Merge branch 'for-4.14/block' of git://git.kernel.dk/linux-block 2017-09-07 11:59:42 -07:00
meta_io.h
ops_fstype.c gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd 2018-12-01 09:42:51 +01:00
quota.c Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 18:54:01 -07:00
quota.h gfs2: Fix fallocate chunk size 2018-05-30 07:52:35 +02:00
recovery.c VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) 2017-07-17 08:45:34 +01:00
recovery.h GFS2: Fix gfs2_replay_incr_blk for multiple journal sizes 2016-07-21 13:02:44 -05:00
rgrp.c gfs2: Fix marking bitmaps non-full 2019-12-01 09:13:17 +01:00
rgrp.h GFS2: Non-recursive delete 2017-04-19 08:25:43 -04:00
super.c GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads 2019-11-24 08:23:25 +01:00
super.h
sys.c VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) 2017-07-17 08:45:34 +01:00
sys.h
trace_gfs2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trans.c gfs2: fix glock reference problem in gfs2_trans_remove_revoke 2019-12-17 20:40:01 +01:00
trans.h
util.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
util.h GFS2: Fix up some sparse warnings 2017-08-25 18:47:18 -05:00
xattr.c gfs2: don't return ENODATA in __gfs2_xattr_set unless replacing 2017-08-31 07:43:03 -05:00
xattr.h