diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-08-01 07:40:48 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-08-01 07:40:48 -0700 |
commit | 0c60d3aa0e2d007e7f79c96c118da25f594afe02 (patch) | |
tree | 7cbb2e92dcdfa9119f9a982ca5d0e7e8e51af868 /fs/xfs/xfs_log.c | |
parent | ff23f4af7efd86cbb1bda42fe2171e0790f9cb5a (diff) | |
download | op-kernel-dev-0c60d3aa0e2d007e7f79c96c118da25f594afe02.zip op-kernel-dev-0c60d3aa0e2d007e7f79c96c118da25f594afe02.tar.gz |
xfs: refactor log recovery check
Add a predicate to decide if the log is actively in recovery and use
that instead of open-coding a pagf_init check in the attr leaf verifier.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index fd10b14..00df4f3 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -4104,3 +4104,12 @@ xfs_log_check_lsn( return valid; } + +bool +xfs_log_in_recovery( + struct xfs_mount *mp) +{ + struct xlog *log = mp->m_log; + + return log->l_flags & XLOG_ACTIVE_RECOVERY; +} |