It failed on f2fs:
      QA output created by 103
     +fallocate: No space left on device
      Silence is golden.
     ...

f2fs uses index(radix) tree as mapping metadata, its space overhead
is about one thousandth of the data.

Suggested-by: Chao Yu <[email protected]>
Signed-off-by: Sun Ke <[email protected]>
---
 tests/generic/103 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/generic/103 b/tests/generic/103
index b22b0159..cf610047 100755
--- a/tests/generic/103
+++ b/tests/generic/103
@@ -40,10 +40,18 @@ rm -f $seqres.full
 _consume_freesp()
 {
        file=$1
+       left=512
 
        # consume nearly all available space (leave ~512kB)
        avail=`_get_available_space $SCRATCH_MNT`
-       filesizekb=$((avail / 1024 - 512))
+
+       # f2fs uses index(radix) tree as mapping metadata, its space overhead
+       # is about one thousandth of the data
+       if [ $FSTYP == "f2fs" ]; then
+               left=$((left + avail / 1024000))
+       fi
+
+       filesizekb=$((avail / 1024 - $left))
        $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
 }
 
-- 
2.13.6



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to