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>
This commit is contained in:
Darrick J. Wong
2018-08-01 07:40:48 -07:00
parent ff23f4af7e
commit 0c60d3aa0e
3 changed files with 11 additions and 2 deletions

View File

@@ -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;
}