linux/fs/gfs2
Andreas Gruenbacher 706cb5492c gfs2: Inode dirtying fix
With the recent iomap write page reclaim deadlock fix, it turns out that the
GLF_DIRTY flag isn't always set when it needs to be anymore: previously, this
happened as a side effect of always adding the inode buffer head to the current
transaction with gfs2_trans_add_meta, but this isn't happening consistently
anymore.  Fix by removing an additional unnecessary gfs2_trans_add_meta call
and by setting the GLF_DIRTY flag in gfs2_iomap_end.

(The GLF_DIRTY flag causes inode_go_sync to flush the transaction log when
syncing out the glock of that inode.  When the flag isn't set, inode_go_sync
will skip inodes, including ones with an i_state of I_DIRTY_PAGES, which will
lead to cluster incoherency.)

In addition, in gfs2_iomap_page_done, if the metadata has changed, mark the
inode as I_DIRTY_DATASYNC to have the inode added to the current transaction:
we don't expect metadata to change here, but let's err on the safe side.

Fixes: d0a22a4b03 ("gfs2: Fix iomap write page reclaim deadlock");
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2019-07-31 18:51:50 +02:00
..
acl.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
acl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
aops.c gfs2: use iomap_bmap instead of generic_block_bmap 2019-07-03 14:45:18 +02:00
aops.h gfs2: mark stuffed_readpage static 2019-07-03 14:45:18 +02:00
bmap.c gfs2: Inode dirtying fix 2019-07-31 18:51:50 +02:00
bmap.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
dentry.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
dir.c gfs2: Use IS_ERR_OR_NULL 2019-06-27 20:53:46 +02:00
dir.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
export.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
file.c New for 5.3: 2019-07-12 16:54:37 -07:00
gfs2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
glock.c gfs2: dump fsid when dumping glock problems 2019-06-27 21:27:43 +02:00
glock.h gfs2: dump fsid when dumping glock problems 2019-06-27 21:27:43 +02:00
glops.c gfs2: replace more printk with calls to fs_info and friends 2019-06-27 21:30:27 +02:00
glops.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
incore.h gfs2: dump fsid when dumping glock problems 2019-06-27 21:27:43 +02:00
inode.c gfs2: Use IS_ERR_OR_NULL 2019-06-27 20:53:46 +02:00
inode.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
lock_dlm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
log.c gfs2: eliminate tr_num_revoke_rm 2019-06-27 21:03:53 +02:00
log.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
lops.c gfs2: dump fsid when dumping glock problems 2019-06-27 21:27:43 +02:00
lops.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
main.c SPDX update for 5.2-rc4 2019-06-08 12:52:42 -07: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 gfs2: Rename SDF_SHUTDOWN to SDF_WITHDRAWN 2019-06-27 21:26:35 +02:00
meta_io.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
ops_fstype.c gfs2: Rename SDF_SHUTDOWN to SDF_WITHDRAWN 2019-06-27 21:26:35 +02:00
quota.c gfs2: Rename SDF_SHUTDOWN to SDF_WITHDRAWN 2019-06-27 21:26:35 +02:00
quota.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
recovery.c gfs2: log which portion of the journal is replayed 2019-06-27 21:03:58 +02:00
recovery.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
rgrp.c gfs2: replace more printk with calls to fs_info and friends 2019-06-27 21:30:27 +02:00
rgrp.h gfs2: dump fsid when dumping glock problems 2019-06-27 21:27:43 +02:00
super.c gfs2: replace more printk with calls to fs_info and friends 2019-06-27 21:30:27 +02:00
super.h gfs2: Clean up freeing struct gfs2_sbd 2019-06-27 20:53:45 +02:00
sys.c Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
sys.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
trace_gfs2.h gfs2: eliminate rs_inum and reduce the size of gfs2 inodes 2018-06-21 07:39:31 -05:00
trans.c gfs2: eliminate tr_num_revoke_rm 2019-06-27 21:03:53 +02:00
trans.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
util.c gfs2: dump fsid when dumping glock problems 2019-06-27 21:27:43 +02:00
util.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
xattr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
xattr.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00