diff options
author | Dave Chinner <dchinner@redhat.com> | 2020-03-26 04:18:21 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-03-27 18:32:53 +0300 |
commit | dd401770b0ff68f896002649c593bbb9560f916d (patch) | |
tree | ed4140948323f76287ea759b1c31f4ea55b514bf /fs/xfs/xfs_log_priv.h | |
parent | 9590e9c68449055c97e954118699bc9d470d7e30 (diff) | |
download | linux-dd401770b0ff68f896002649c593bbb9560f916d.tar.xz |
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>
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r-- | fs/xfs/xfs_log_priv.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index b895e16460ee..1f450ea6192c 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h @@ -443,6 +443,10 @@ int xlog_write(struct xlog *log, struct xfs_log_vec *log_vector, struct xlog_ticket *tic, xfs_lsn_t *start_lsn, struct xlog_in_core **commit_iclog, uint flags, bool need_start_rec); +int xlog_write_done(struct xlog *log, struct xlog_ticket *ticket, + struct xlog_in_core **iclog, xfs_lsn_t *lsn); +void xlog_ticket_done(struct xlog *log, struct xlog_ticket *ticket, + bool regrant); /* * When we crack an atomic LSN, we sample it first so that the value will not |