xfs: automatic dfops buffer relogging
authorBrian Foster <bfoster@redhat.com>
Wed, 1 Aug 2018 14:20:32 +0000 (07:20 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 3 Aug 2018 06:05:13 +0000 (23:05 -0700)
commit82ff27bc52a88cb5cc400bfa64e210d3ec8dfebd
treeeab2a904953ffc246e955cf610f151cc8f5bf40b
parent488c919a5bec3be4b8613898de6958043edbb8d9
xfs: automatic dfops buffer relogging

Buffers that are held across deferred operations are explicitly
joined to the dfops structure to ensure appropriate relogging.
While buffers are currently joined explicitly, we can detect the
conditions that require relogging at dfops finish time by inspecting
the transaction item list for held buffers.

Replace the xfs_defer_bjoin() infrastructure with such detection and
automatic relogging of held buffers. This eliminates the need for
the per-dfops buffer list, replaced by an on-stack variant in
xfs_defer_trans_roll().

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_attr.c
fs/xfs/libxfs/xfs_defer.c
fs/xfs/libxfs/xfs_defer.h
fs/xfs/xfs_dquot.c
fs/xfs/xfs_trans.h