generic: fallocate two bytes at block boundary

Allocating two bytes at a block boundary with fallocate should allocate
both blocks involved.  Test this by writing data to both bytes
afterwards and see whether the on-disk size increases (it should not).

This is a regression test for the kernel patch "xfs: Fix tail rounding
in xfs_alloc_file_space()".

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Max Reitz
2019-09-27 12:38:46 +02:00
committed by Eryu Guan
parent fa85aa6497
commit c599af2ca6
3 changed files with 65 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
QA output created by 568
wrote 2/2 bytes at offset block_size - 1
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
OK: File did not grow.