From 74777e97c56b516e8dd8b0b40d64ffd00d9216fc Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 8 Oct 2024 09:12:09 +0200 Subject: [PATCH] generic/694: sync before sampling i_blocks Without a sync there might still be temporary blocks in i_blocks like indirect block reservations or additional blocks reserved for out of place writes. Signed-off-by: Christoph Hellwig Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- tests/generic/694 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/generic/694 b/tests/generic/694 index 02253ef7..a68fc523 100755 --- a/tests/generic/694 +++ b/tests/generic/694 @@ -37,6 +37,10 @@ if [ $? -ne 0 ]; then echo "Could not create 4G test file" fi +# make sure indirect block reservations and other temporary block reservations +# are released before sampling i_blocks +sync $junk_file + iblocks=`stat -c '%b' $junk_file` _test_cycle_mount -- 2.39.5