diff options
author | Christoph Hellwig <hch@lst.de> | 2018-03-13 23:15:28 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-03-14 11:12:52 -0700 |
commit | 60e5bb7844ec75a2f54ea76d8ceec5c79172ce7e (patch) | |
tree | ba0e950311de02c6d6585a9941c3f7a8ba1f22e2 /fs/xfs/xfs_log.c | |
parent | 2b56c2857fde3c7f74174dd2fe3d7b8833d82744 (diff) | |
download | linux-stable-60e5bb7844ec75a2f54ea76d8ceec5c79172ce7e.tar.gz linux-stable-60e5bb7844ec75a2f54ea76d8ceec5c79172ce7e.tar.bz2 linux-stable-60e5bb7844ec75a2f54ea76d8ceec5c79172ce7e.zip |
xfs: merge _xfs_log_force and xfs_log_force
Switch to a single interface for flushing the whole log, which gives
consistent trace point coverage, and removes the unused log_flushed
argument for the previous _xfs_log_force callers.
Signed-off-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>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 2f529fd7bf67..3ce17e79b6e0 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -869,7 +869,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) return 0; } - error = _xfs_log_force(mp, XFS_LOG_SYNC, NULL); + error = xfs_log_force(mp, XFS_LOG_SYNC); ASSERT(error || !(XLOG_FORCED_SHUTDOWN(log))); #ifdef DEBUG @@ -3304,16 +3304,16 @@ xlog_state_switch_iclogs( * not in the active nor dirty state. */ int -_xfs_log_force( +xfs_log_force( struct xfs_mount *mp, - uint flags, - int *log_flushed) + uint flags) { struct xlog *log = mp->m_log; struct xlog_in_core *iclog; xfs_lsn_t lsn; XFS_STATS_INC(mp, xs_log_force); + trace_xfs_log_force(mp, 0, _RET_IP_); xlog_cil_force(log); @@ -3362,8 +3362,6 @@ _xfs_log_force( if (xlog_state_release_iclog(log, iclog)) return -EIO; - if (log_flushed) - *log_flushed = 1; spin_lock(&log->l_icloglock); if (be64_to_cpu(iclog->ic_header.h_lsn) == lsn && iclog->ic_state != XLOG_STATE_DIRTY) @@ -3416,20 +3414,6 @@ no_sleep: } /* - * Wrapper for _xfs_log_force(), to be used when caller doesn't care - * about errors or whether the log was flushed or not. This is the normal - * interface to use when trying to unpin items or move the log forward. - */ -void -xfs_log_force( - xfs_mount_t *mp, - uint flags) -{ - trace_xfs_log_force(mp, 0, _RET_IP_); - _xfs_log_force(mp, flags, NULL); -} - -/* * Force the in-core log to disk for a specific LSN. * * Find in-core log with lsn. @@ -4035,7 +4019,7 @@ xfs_log_force_umount( * to guarantee this. */ if (!logerror) - _xfs_log_force(mp, XFS_LOG_SYNC, NULL); + xfs_log_force(mp, XFS_LOG_SYNC); /* * mark the filesystem and the as in a shutdown state and wake |