WSL2-Linux-Kernel/fs/gfs2
Andreas Gruenbacher 95ecbd0f16 Revert "gfs2: stop using generic_writepages in gfs2_ail1_start_one"
Commit b2b0a5e978 switched from generic_writepages() to
filemap_fdatawrite_wbc() in gfs2_ail1_start_one() on the path to
replacing ->writepage() with ->writepages() and eventually eliminating
the former.  Function gfs2_ail1_start_one() is called from
gfs2_log_flush(), our main function for flushing the filesystem log.

Unfortunately, at least as implemented today, ->writepage() and
->writepages() are entirely different operations for journaled data
inodes: while the former creates and submits transactions covering the
data to be written, the latter flushes dirty buffers out to disk.

With gfs2_ail1_start_one() now calling ->writepages(), we end up
creating filesystem transactions while we are in the course of a log
flush, which immediately deadlocks on the sdp->sd_log_flush_lock
semaphore.

Work around that by going back to how things used to work before commit
b2b0a5e978 for now; figuring out a superior solution will take time we
don't have available right now.  However ...

Since the removal of generic_writepages() is imminent, open-code it
here.  We're already inside a blk_start_plug() ...  blk_finish_plug()
section here, so skip that part of the original generic_writepages().

This reverts commit b2b0a5e978.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Acked-by: Christoph Hellwig <hch@lst.de>
2023-01-22 09:46:14 +01:00
..
Kconfig
Makefile
acl.c
acl.h
aops.c gfs2: Always check inode size of inline inodes 2022-12-06 16:06:31 +01:00
aops.h
bmap.c gfs2: Always check inode size of inline inodes 2022-12-06 16:06:31 +01:00
bmap.h
dentry.c
dir.c
dir.h
export.c
file.c gfs2: Make gfs2_glock_hold return its glock argument 2022-12-06 16:06:31 +01:00
gfs2.h
glock.c gfs2: Remove support for glock holder auto-demotion (2) 2022-12-15 12:41:22 +01:00
glock.h gfs2: Remove support for glock holder auto-demotion 2022-12-15 12:41:22 +01:00
glops.c gfs2: Always check inode size of inline inodes 2022-12-06 16:06:31 +01:00
glops.h
incore.h gfs2: Remove support for glock holder auto-demotion 2022-12-15 12:41:22 +01:00
inode.c gfs2 fixes 2022-12-17 08:18:04 -06:00
inode.h
lock_dlm.c
log.c Revert "gfs2: stop using generic_writepages in gfs2_ail1_start_one" 2023-01-22 09:46:14 +01:00
log.h
lops.c
lops.h
main.c
meta_io.c gfs2: Fix and clean up create / evict interaction 2022-12-02 15:58:00 +01:00
meta_io.h
ops_fstype.c
quota.c
quota.h
recovery.c
recovery.h
rgrp.c
rgrp.h
super.c gfs2: Simply dequeue iopen glock in gfs2_evict_inode 2022-12-06 16:06:32 +01:00
super.h
sys.c
sys.h
trace_gfs2.h
trans.c
trans.h
util.c
util.h
xattr.c gfs2: Fix and clean up create / evict interaction 2022-12-02 15:58:00 +01:00
xattr.h