# Only run this on xfs if xfs_scrub is available and has the unicode checker
check_xfs_scrub() {
- # Ignore non-XFS fs or no scrub program...
- if [ "${FSTYP}" != "xfs" ] || [ ! -x "${XFS_SCRUB_PROG}" ]; then
- return 1
- fi
+ [ "$FSTYP" == "xfs" ] || return 1
+ _supports_xfs_scrub "$SCRATCH_MNT" "$SCRATCH_DEV" || return 1
# We only care if xfs_scrub has unicode string support...
if ! type ldd > /dev/null 2>&1 || \
return 1
fi
- # Does the ioctl work?
- if $XFS_IO_PROG -x -c "scrub probe 0" $SCRATCH_MNT 2>&1 | \
- grep -q "Inappropriate ioctl"; then
- return 1
- fi
-
return 0
}