Check that the file system actually supports preallocation for defrag
tests that end up calling xfs_fsr, as they can't be supported in
always_cow mode.
[Eryu: add comments in code as well]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
{
case "$FSTYP" in
xfs)
+ # xfs_fsr does preallocates, require "falloc"
+ _require_xfs_io_command "falloc"
DEFRAG_PROG="$XFS_FSR_PROG"
;;
ext4|ext4dev)