]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs: xfs_fsr requires working preallocation support
authorChristoph Hellwig <hch@lst.de>
Sat, 10 Nov 2018 11:51:44 +0000 (12:51 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 18 Nov 2018 13:21:11 +0000 (21:21 +0800)
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>
common/defrag

index df249dfda660da07aa45c358cc189532c9e64981..2bd739c017c2aa06cc4e650b506d2c4873812d35 100644 (file)
@@ -8,6 +8,8 @@ _require_defrag()
 {
     case "$FSTYP" in
     xfs)
+        # xfs_fsr does preallocates, require "falloc"
+        _require_xfs_io_command "falloc"
         DEFRAG_PROG="$XFS_FSR_PROG"
        ;;
     ext4|ext4dev)