]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fsx: disable allocsp_calls if -F is specified
authorZorro Lang <zlang@redhat.com>
Sat, 29 Jan 2022 04:44:31 +0000 (12:44 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 13 Feb 2022 17:10:47 +0000 (01:10 +0800)
As the fsx.c source code says:
  int     fallocate_calls = 1;            /* -F flag disables */
  int     allocsp_calls = 1;              /* -F flag disables */

The allocsp_calls and fallocate_calls should be disabled, if the -F
option is specified. But current fsx forgets to disable allocsp_calls
as is documented.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
ltp/fsx.c

index 520e53a274a184f8ff4bd60479a750eab2ca54f0..3ee37fe8ec54fd4a22d9ff322a0dd645c0a16324 100644 (file)
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -2835,6 +2835,7 @@ main(int argc, char **argv)
                        break;
                case 'F':
                        fallocate_calls = 0;
+                       allocsp_calls = 0;
                        break;
                case 'K':
                        keep_size_calls = 0;