All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [RFC PATCH] fallocate05: increase the fallocate and defallocate size
@ 2021-08-17 10:46 Li Wang
  2021-09-07  2:40   ` Li Wang
  2021-09-21 20:33 ` Ralph Siemsen
  0 siblings, 2 replies; 31+ messages in thread
From: Li Wang @ 2021-08-17 10:46 UTC (permalink / raw)
  To: ltp

The last write(fd, buf, 10) in the test is used to detect whether
'FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE' deallocating file space
success or not.

But it is not to be a reliable way on returning ENOSPEC if the defallocated
space is too small(only 4 blocks, x86_64). That's because filesystem metadata
might be extending to occupy that space during punch a hole.

Better to increase the size of fallocate/defallocate to reduce interference
from metadata changing.

    33	tst_test.c:1410: TINFO: Testing on ext4
    34	tst_test.c:914: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
    35	mke2fs 1.45.6 (20-Mar-2020)
    36	tst_test.c:1342: TINFO: Timeout per run is 0h 05m 00s
    37	tst_fill_fs.c:32: TINFO: Creating file mntpoint/file0 size 21710183
        ...
    46	tst_fill_fs.c:32: TINFO: Creating file mntpoint/file9 size 36207821
    47	tst_fill_fs.c:32: TINFO: Creating file mntpoint/file10 size 81483962
    48	tst_fill_fs.c:59: TINFO: write(): ENOSPC (28)
    49	fallocate05.c:81: TPASS: write() wrote 65536 bytes
    50	fallocate05.c:102: TINFO: fallocate()d 0 extra blocks on full FS
    51	fallocate05.c:114: TPASS: fallocate() on full FS
    52	fallocate05.c:130: TPASS: fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE)
    53	fallocate05.c:134: TFAIL: write(): ENOSPC (28)

Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/kernel/syscalls/fallocate/fallocate05.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/fallocate/fallocate05.c b/testcases/kernel/syscalls/fallocate/fallocate05.c
index 55ec1aee4..74bfa4861 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate05.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate05.c
@@ -26,8 +26,8 @@
 #include "lapi/fallocate.h"
 
 #define MNTPOINT "mntpoint"
-#define FALLOCATE_BLOCKS 16
-#define DEALLOCATE_BLOCKS 4
+#define FALLOCATE_BLOCKS 256
+#define DEALLOCATE_BLOCKS 64
 #define TESTED_FLAGS "fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE)"
 
 static char *buf;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2021-09-27  1:37 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 10:46 [LTP] [RFC PATCH] fallocate05: increase the fallocate and defallocate size Li Wang
2021-09-07  2:40 ` Li Wang
2021-09-07  2:40   ` Li Wang
2021-09-07  8:00     ` Jan Stancek
2021-09-07  8:00       ` Jan Stancek
2021-09-08  1:21         ` Li Wang
2021-09-08  1:21           ` Li Wang
2021-09-21 20:33 ` Ralph Siemsen
2021-09-22  5:03   ` Li Wang
2021-09-22  8:21     ` Cyril Hrubis
2021-09-22  9:53       ` Li Wang
2021-09-22  9:56         ` Cyril Hrubis
2021-09-22 10:34           ` Li Wang
2021-09-22 14:32             ` Cyril Hrubis
2021-09-22 16:52               ` Ralph Siemsen
2021-09-23  3:00                 ` Li Wang
2021-09-23  6:29                   ` Li Wang
2021-09-23 13:09                     ` Cyril Hrubis
2021-09-24  4:27                       ` Li Wang
2021-09-23 14:33                 ` Cyril Hrubis
2021-09-24  1:49                   ` Ralph Siemsen
2021-09-24  4:18                     ` Li Wang
2021-09-24 15:11                       ` Ralph Siemsen
2021-09-24 18:26                         ` Cyril Hrubis
2021-09-24 20:26                           ` Ralph Siemsen
2021-09-25  2:16                             ` Ralph Siemsen
2021-09-26  7:17                             ` Li Wang
2021-09-26  7:40                               ` Li Wang
2021-09-26  7:39                           ` Li Wang
2021-09-27  1:37                             ` Ralph Siemsen
2021-09-24  6:49                   ` Li Wang
2021-09-24  9:33                     ` Cyril Hrubis
2021-09-23  6:39       ` Li Wang
2021-09-23 13:10         ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.