[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block/file-posix: Truncate in xfs_write_zeroes(
Re: [Qemu-devel] [PATCH] block/file-posix: Truncate in xfs_write_zeroes()
Mon, 13 May 2019 13:08:23 +0200
Am 10.05.2019 um 23:12 hat Max Reitz geschrieben:
> XFS_IOC_ZERO_RANGE does not increase the file length:
> $ touch foo
> $ xfs_io -c 'zero 0 65536' foo
> $ stat -c "size=%s, blocks=%b" foo
> size=0, blocks=128
> We do want writes beyond the EOF to automatically increase the file
> length, however. This is evidenced by the fact that iotest 061 is
> broken on XFS since qcow2's check implementation checks for blocks
> beyond the EOF.
> Reported-by: Kevin Wolf <address@hidden>
> Signed-off-by: Max Reitz <address@hidden>
Just for the record, the commit that made the problem visible in 061 is
Thanks, applied to the block branch.
Though I wonder if we should prefer FALLOC_FL_ZERO_RANGE now if
available, which is a single syscall and consistent for all filesystems.