android_kernel_motorola_sm6375/fs/xfs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Brian Foster 45a841719f xfs: drain the buf delwri queue before xfsaild idles
commit f376b45e861d8b7b34bf0eceeecfdd00dbe65cde upstream.

xfsaild is racy with respect to transaction abort and shutdown in
that the task can idle or exit with an empty AIL but buffers still
on the delwri queue. This was partly addressed by cancelling the
delwri queue before the task exits to prevent memory leaks, but it's
also possible for xfsaild to empty and idle with buffers on the
delwri queue. For example, a transaction that pins a buffer that
also happens to sit on the AIL delwri queue will explicitly remove
the associated log item from the AIL if the transaction aborts. The
side effect of this is an unmount hang in xfs_wait_buftarg() as the
associated buffers remain held by the delwri queue indefinitely.
This is reproduced on repeated runs of generic/531 with an fs format
(-mrmapbt=1 -bsize=1k) that happens to also reproduce transaction
aborts.

Update xfsaild to not idle until both the AIL and associated delwri
queue are empty and update the push code to continue delwri queue
submission attempts even when the AIL is empty. This allows the AIL
to eventually release aborted buffers stranded on the delwri queue
when they are unlocked by the associated transaction. This should
have no significant effect on normal runtime behavior because the
xfsaild currently idles only when the AIL is empty and in practice
the AIL is rarely empty with a populated delwri queue. The items
must be AIL resident to land in the queue in the first place and
generally aren't removed until writeback completes.

Note that the pre-existing delwri queue cancel logic in the exit
path is retained because task stop is external, could technically
come at any point, and xfsaild is still responsible to release its
buffer references before it exits.

Signed-off-by: Brian Foster <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Acked-by: Darrick J. Wong <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-25 17:42:03 +01:00
..
libxfs xfs: redesign the reflink remap loop to fix blkres depletion crash 2022-11-25 17:42:03 +01:00
scrub xfs: strengthen rmap record flags checking 2020-11-24 13:29:18 +01:00
Kconfig
kmem.c
kmem.h
Makefile
mrlock.h
xfs.h
xfs_acl.c xfs: always log corruption errors 2022-09-28 11:04:10 +02:00
xfs_acl.h
xfs_aops.c
xfs_aops.h
xfs_attr_inactive.c xfs: add a function to deal with corrupt buffers post-verifiers 2022-10-29 10:20:33 +02:00
xfs_attr_list.c xfs: add a function to deal with corrupt buffers post-verifiers 2022-10-29 10:20:33 +02:00
xfs_bio_io.c
xfs_bmap_item.c xfs: always log corruption errors 2022-09-28 11:04:10 +02:00
xfs_bmap_item.h
xfs_bmap_util.c xfs: preserve rmapbt swapext block reservation from freed blocks 2022-11-25 17:42:03 +01:00
xfs_bmap_util.h
xfs_buf.c xfs: xfs_buf_corruption_error should take __this_address 2022-10-29 10:20:33 +02:00
xfs_buf.h xfs: add a function to deal with corrupt buffers post-verifiers 2022-10-29 10:20:33 +02:00
xfs_buf_item.c xfs: use bitops interface for buf log item AIL flag check 2022-09-28 11:04:11 +02:00
xfs_buf_item.h
xfs_dir2_readdir.c
xfs_discard.c
xfs_discard.h
xfs_dquot.c xfs: use ordered buffers to initialize dquot buffers during quotacheck 2022-11-10 17:57:53 +01:00
xfs_dquot.h xfs: remove the xfs_dq_logitem_t typedef 2022-10-29 10:20:33 +02:00
xfs_dquot_item.c xfs: trylock underlying buffer on dquot flush 2022-10-29 10:20:34 +02:00
xfs_dquot_item.h xfs: factor out quotaoff intent AIL removal and memory free 2022-10-29 10:20:33 +02:00
xfs_error.c xfs: xfs_buf_corruption_error should take __this_address 2022-10-29 10:20:33 +02:00
xfs_error.h xfs: xfs_buf_corruption_error should take __this_address 2022-10-29 10:20:33 +02:00
xfs_export.c xfs: factor out a new xfs_log_force_inode helper 2022-10-29 10:20:34 +02:00
xfs_export.h
xfs_extent_busy.c
xfs_extent_busy.h
xfs_extfree_item.c xfs: always log corruption errors 2022-09-28 11:04:10 +02:00
xfs_extfree_item.h
xfs_file.c xfs: use MMAPLOCK around filemap_map_pages() 2022-11-25 17:42:03 +01:00
xfs_filestream.c
xfs_filestream.h
xfs_fsmap.c xfs: add missing assert in xfs_fsmap_owner_from_rmap 2022-09-28 11:04:09 +02:00
xfs_fsmap.h
xfs_fsops.c
xfs_fsops.h
xfs_globals.c
xfs_health.c
xfs_icache.c
xfs_icache.h
xfs_icreate_item.c
xfs_icreate_item.h
xfs_inode.c xfs: Add the missed xfs_perag_put() for xfs_ifree_cluster() 2022-11-10 17:57:54 +01:00
xfs_inode.h xfs: factor out a new xfs_log_force_inode helper 2022-10-29 10:20:34 +02:00
xfs_inode_item.c xfs: tail updates only need to occur when LSN changes 2022-10-29 10:20:34 +02:00
xfs_inode_item.h
xfs_ioctl.c xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate 2022-01-11 15:23:32 +01:00
xfs_ioctl.h
xfs_ioctl32.c
xfs_ioctl32.h
xfs_iomap.c xfs: don't fail unwritten extent conversion on writeback due to edquot 2022-11-10 17:57:54 +01:00
xfs_iomap.h
xfs_iops.c xfs: always log corruption errors 2022-09-28 11:04:10 +02:00
xfs_iops.h
xfs_itable.c
xfs_itable.h
xfs_iwalk.c
xfs_iwalk.h
xfs_linux.h
xfs_log.c xfs: don't write a corrupt unmount record to force summary counter recalc 2022-10-29 10:20:34 +02:00
xfs_log.h
xfs_log_cil.c xfs: fix use-after-free on CIL context on shutdown 2022-10-29 10:20:34 +02:00
xfs_log_priv.h xfs: fix use-after-free on CIL context on shutdown 2022-10-29 10:20:34 +02:00
xfs_log_recover.c xfs: remove the xfs_disk_dquot_t and xfs_dquot_t 2022-10-29 10:20:33 +02:00
xfs_message.c xfs: constify the buffer pointer arguments to error functions 2022-09-28 11:04:10 +02:00
xfs_message.h xfs: constify the buffer pointer arguments to error functions 2022-09-28 11:04:10 +02:00
xfs_mount.c xfs: don't commit sunit/swidth updates to disk if that would cause repair failures 2022-09-28 11:04:11 +02:00
xfs_mount.h xfs: move inode flush to the sync workqueue 2022-10-29 10:20:34 +02:00
xfs_mru_cache.c
xfs_mru_cache.h
xfs_ondisk.h
xfs_pnfs.c xfs: slightly tweak an assert in xfs_fs_map_blocks 2022-09-28 11:04:09 +02:00
xfs_pnfs.h
xfs_pwork.c
xfs_pwork.h
xfs_qm.c xfs: clear XFS_DQ_FREEING if we can't lock the dquot buffer to flush 2022-11-03 23:56:54 +09:00
xfs_qm.h
xfs_qm_bhv.c xfs: remove the xfs_disk_dquot_t and xfs_dquot_t 2022-10-29 10:20:33 +02:00
xfs_qm_syscalls.c xfs: fix unmount hang and memory leak on shutdown during quotaoff 2022-10-29 10:20:33 +02:00
xfs_quota.h
xfs_quotaops.c
xfs_refcount_item.c xfs: always log corruption errors 2022-09-28 11:04:10 +02:00
xfs_refcount_item.h
xfs_reflink.c xfs: redesign the reflink remap loop to fix blkres depletion crash 2022-11-25 17:42:03 +01:00
xfs_reflink.h
xfs_rmap_item.c xfs: always log corruption errors 2022-09-28 11:04:10 +02:00
xfs_rmap_item.h
xfs_rtalloc.c
xfs_rtalloc.h
xfs_stats.c xfs: Use scnprintf() for avoiding potential buffer overflow 2022-10-29 10:20:33 +02:00
xfs_stats.h
xfs_super.c xfs: preserve inode versioning across remounts 2022-11-25 17:42:03 +01:00
xfs_super.h
xfs_symlink.c
xfs_symlink.h
xfs_sysctl.c
xfs_sysctl.h
xfs_sysfs.c
xfs_sysfs.h
xfs_trace.c
xfs_trace.h xfs: redesign the reflink remap loop to fix blkres depletion crash 2022-11-25 17:42:03 +01:00
xfs_trans.c xfs: preserve rmapbt swapext block reservation from freed blocks 2022-11-25 17:42:03 +01:00
xfs_trans.h
xfs_trans_ail.c xfs: drain the buf delwri queue before xfsaild idles 2022-11-25 17:42:03 +01:00
xfs_trans_buf.c
xfs_trans_dquot.c xfs: group quota should return EDQUOT when prj quota enabled 2022-11-10 17:57:54 +01:00
xfs_trans_priv.h xfs: tail updates only need to occur when LSN changes 2022-10-29 10:20:34 +02:00
xfs_xattr.c