# 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 test 0" $SCRATCH_MNT 2>&1 | \
- grep -q "Inappropriate ioctl"; then
- return 1
- fi
-
return 0
}
if check_xfs_scrub; then
- output="$(${XFS_SCRUB_PROG} -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)"
+ output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)"
echo "${output}" | grep -q "french_" || echo "No complaints about french e accent?"
echo "${output}" | grep -q "chinese_" || echo "No complaints about chinese width-different?"
echo "${output}" | grep -q "greek_" || echo "No complaints about greek letter mess?"