mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 06:25:37 +03:00
test-copy: use non-0 data block in copy_holes
Some filesystems (e.g. zfs with compression!=off, which is the default configuration) automatically hole-punch all-zero blocks ‒ write a block full of ones instead
This commit is contained in:
parent
53877d0385
commit
d66b77b4d8
@ -343,7 +343,8 @@ TEST_RET(copy_holes) {
|
||||
|
||||
assert_se(fstat(fd, &stat) >= 0);
|
||||
blksz = stat.st_blksize;
|
||||
buf = alloca0(blksz);
|
||||
buf = alloca_safe(blksz);
|
||||
memset(buf, 1, blksz);
|
||||
|
||||
/* We need to make sure to create hole in multiples of the block size, otherwise filesystems (btrfs)
|
||||
* might silently truncate/extend the holes. */
|
||||
|
Loading…
Reference in New Issue
Block a user