diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-02-26 22:43:18 -0600 |
---|---|---|
committer | Eric Sandeen <sandeen@redhat.com> | 2018-02-26 22:43:18 -0600 |
commit | 221b1ddc29415a673750665696f95990c53d8d2e (patch) | |
tree | 9c601e98171825d58b59237e55aa5d909b718297 | |
parent | 1048d0e209ca4ad387485e6aeed07dd5870b0f36 (diff) | |
download | xfsprogs-dev-221b1ddc29415a673750665696f95990c53d8d2e.tar.gz |
xfs: cross-reference the realtime bitmap
Source kernel commit: 46d9bfb5e706493777b9dfed666cd8967f69e6fd
While we're scrubbing various btrees, cross-reference the records
with the other metadata.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r-- | libxfs/xfs_rtbitmap.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libxfs/xfs_rtbitmap.c b/libxfs/xfs_rtbitmap.c index 9970c48140..cf04ccac4c 100644 --- a/libxfs/xfs_rtbitmap.c +++ b/libxfs/xfs_rtbitmap.c @@ -1092,3 +1092,24 @@ xfs_verify_rtbno( { return rtbno < mp->m_sb.sb_rblocks; } + +/* Is the given extent all free? */ +int +xfs_rtalloc_extent_is_free( + struct xfs_mount *mp, + struct xfs_trans *tp, + xfs_rtblock_t start, + xfs_extlen_t len, + bool *is_free) +{ + xfs_rtblock_t end; + int matches; + int error; + + error = xfs_rtcheck_range(mp, tp, start, len, 1, &end, &matches); + if (error) + return error; + + *is_free = matches; + return 0; +} |