From 7022f85ca72f3b0fda02b903e2ef99c803e836f2 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 10 Nov 2018 12:51:44 +0100 Subject: [PATCH] xfs: xfs_fsr requires working preallocation support 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 Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- common/defrag | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/defrag b/common/defrag index df249dfd..2bd739c0 100644 --- a/common/defrag +++ b/common/defrag @@ -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) -- 2.39.5