]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
generic/694: sync before sampling i_blocks
authorChristoph Hellwig <hch@lst.de>
Tue, 8 Oct 2024 07:12:09 +0000 (09:12 +0200)
committerZorro Lang <zlang@kernel.org>
Thu, 10 Oct 2024 09:46:52 +0000 (17:46 +0800)
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 <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/694

index 02253ef752e9a331fdb661fabfa1da297e417ab5..a68fc5230405cb8f4a9a7bc9c0765946df4da3de 100755 (executable)
@@ -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