xfs: test xfs_getbmapx behavior with shared extents

Make sure that xfs_getbmapx behaves properly w.r.t. shared extents
and CoW fork reporting.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
Darrick J. Wong
2016-02-03 14:18:25 -08:00
parent 0ace8feb84
commit c74b4cb7b0
8 changed files with 391 additions and 0 deletions
+19
View File
@@ -3075,6 +3075,25 @@ _require_xfs_scratch_rmapbt()
_scratch_unmount
}
_xfs_bmapx_find() {
case "$1" in
"attr")
param="a"
;;
"cow")
param="c"
;;
*)
param="e"
;;
esac
shift
file="$1"
shift
"$XFS_IO_PROG" -c "bmap -${param}lpv" "$file" | grep -c "$@"
}
_get_total_inode()
{
if [ -z "$1" ]; then