linux/fs/gfs2
Bob Peterson 5e4c7632aa gfs2: Issue revokes more intelligently
Before this patch, function gfs2_write_revokes would call
gfs2_ail1_empty, then traverse the sd_ail1_list looking for
transactions that had bds which were no longer queued to a glock.
And if it found some, it would try to issue revokes for them, up to
a predetermined maximum. There were two problems with how it did
this. First was the fact that gfs2_ail1_empty moves transactions
which have nothing remaining on the ail1 list from the sd_ail1_list
to the sd_ail2_list, thus making its traversal of sd_ail1_list
miss them completely, and therefore, never issue revokes for them.
Second was the fact that there were three traversals (or partial
traversals) of the sd_ail1_list, each of which took and then
released the sd_ail_lock lock: First inside gfs2_ail1_empty,
second to determine if there are any revokes to be issued, and
third to actually issue them. All this taking and releasing of the
sd_ail_lock meant other processes could modify the lists and the
conditions in which we're working.

This patch simplies the whole process by adding a new parameter
to function gfs2_ail1_empty, max_revokes. For normal calls, this
is passed in as 0, meaning we don't want to issue any revokes.
For function gfs2_write_revokes, we pass in the maximum number
of revokes we can, thus allowing gfs2_ail1_empty to add the
revokes where needed. This simplies the code, allows for a single
holding of the sd_ail_lock, and allows gfs2_ail1_empty to add
revokes for all the necessary bd items without missing any.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-02-27 07:53:18 -06: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: minor cleanup: remove unneeded variable ret in gfs2_jdata_writepage 2020-01-08 10:39:57 -06:00
aops.h gfs2: mark stuffed_readpage static 2019-07-03 14:45:18 +02:00
bmap.c GFS2 changes for this merge window: 2019-12-05 13:20:11 -08:00
bmap.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
dentry.c gfs2: untangle the logic in gfs2_drevalidate 2019-09-03 09:42:41 +02:00
dir.c fs/gfs2: remove unused IS_DINODE and IS_LEAF macros 2020-01-21 11:19:38 +01:00
dir.h gfs2: Delete an unnecessary check before brelse() 2019-09-04 20:22:17 +02:00
export.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
file.c gfs2: fix O_SYNC write handling 2020-02-06 18:49:41 +01:00
gfs2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
glock.c gfs2: fix infinite loop when checking ail item count before go_inval 2020-02-27 07:53:17 -06:00
glock.h gfs2: Use async glocks for rename 2019-09-04 20:22:17 +02:00
glops.c gfs2: fix infinite loop when checking ail item count before go_inval 2020-02-27 07:53:17 -06:00
glops.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
incore.h gfs2: Force withdraw to replay journals and wait for it to finish 2020-02-27 07:53:12 -06:00
inode.c gfs2: Avoid access time thrashing in gfs2_inode_lookup 2020-01-15 15:20:07 +01: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 gfs2: Force withdraw to replay journals and wait for it to finish 2020-02-27 07:53:12 -06:00
log.c gfs2: Issue revokes more intelligently 2020-02-27 07:53:18 -06:00
log.h gfs2: eliminate ssize parameter from gfs2_struct2blk 2020-01-07 18:46:06 +01:00
lops.c gfs2: Only complain the first time an io error occurs in quota or log 2020-02-10 07:39:50 -06:00
lops.h gfs2: Remove active journal side effect from gfs2_write_log_header 2019-11-12 15:17:53 +01: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: Force withdraw to replay journals and wait for it to finish 2020-02-27 07:53:12 -06: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: Add verbose option to check_journal_clean 2020-02-27 07:53:17 -06:00
quota.c gfs2: Force withdraw to replay journals and wait for it to finish 2020-02-27 07:53:12 -06:00
quota.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
recovery.c gfs2: Ignore dlm recovery requests if gfs2 is withdrawn 2020-02-10 07:39:50 -06:00
recovery.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
rgrp.c gfs2: Rework how rgrp buffer_heads are managed 2020-02-10 07:39:48 -06:00
rgrp.h gfs2: Rework how rgrp buffer_heads are managed 2020-02-10 07:39:48 -06:00
super.c gfs2: Force withdraw to replay journals and wait for it to finish 2020-02-27 07:53:12 -06:00
super.h gfs2: Force withdraw to replay journals and wait for it to finish 2020-02-27 07:53:12 -06:00
sys.c gfs2: Force withdraw to replay journals and wait for it to finish 2020-02-27 07:53:12 -06: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 Revert "gfs2: eliminate tr_num_revoke_rm" 2020-01-28 15:04:53 +01:00
trans.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
util.c gfs2: Add verbose option to check_journal_clean 2020-02-27 07:53:17 -06:00
util.h gfs2: Add verbose option to check_journal_clean 2020-02-27 07:53:17 -06: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