]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/xfs/xfs_log_priv.h
xfs: refactor and split xfs_log_done()
authorDave Chinner <dchinner@redhat.com>
Thu, 26 Mar 2020 01:18:21 +0000 (18:18 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 27 Mar 2020 15:32:53 +0000 (08:32 -0700)
commitdd401770b0ff68f896002649c593bbb9560f916d
treeed4140948323f76287ea759b1c31f4ea55b514bf
parent9590e9c68449055c97e954118699bc9d470d7e30
xfs: refactor and split xfs_log_done()

xfs_log_done() does two separate things. Firstly, it triggers commit
records to be written for permanent transactions, and secondly it
releases or regrants transaction reservation space.

Since delayed logging was introduced, transactions no longer write
directly to the log, hence they never have the XLOG_TIC_INITED flag
cleared on them. Hence transactions never write commit records to
the log and only need to modify reservation space.

Split up xfs_log_done into two parts, and only call the parts of the
operation needed for the context xfs_log_done() is currently being
called from.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_log.c
fs/xfs/xfs_log.h
fs/xfs/xfs_log_cil.c
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_trans.c