Question about fallocate
A message that is not in the archive (sent off-list or not yet received): 20140702014130.47a5ba75@ws
Hi,
Quoted 6 lines
But how did you disable COW? The nodatacow mount option? Setting the NOCOW attribute on the file or parent-dir (chattr +C)? Something else?
Because there are caveats to both the mount option and the file attribute methods.
I used the nodatacow mount point. When doing the test, I had no other subvolume or snapshot.
Quoted 3 lines
Other than that, I don't know, but it'd be interesting to see if the behavior replicates on a current kernel.
Yes, I'll try to replicate it on a 3.14.x based Fedora 20.
Thanks.
Signature · 5 lines
Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: [email protected] - [email protected] GPG public key ID: FF5F32A8
Quoted 9 lines · Gionatan Danti
Hi,
Quoted 6 lines
But how did you disable COW? The nodatacow mount option? Setting the NOCOW attribute on the file or parent-dir (chattr +C)? Something else?
Because there are caveats to both the mount option and the file attribute methods.
Quoted 7 lines
I used the nodatacow mount point. When doing the test, I had no other subvolume or snapshot.
Quoted 3 lines
Other than that, I don't know, but it'd be interesting to see if the behavior replicates on a current kernel.
Yes, I'll try to replicate it on a 3.14.x based Fedora 20.
I am unable to reproduce the problem on kernel version 3.16.0-rc2 using nodatacow.
$ mkfs.btrfs testdisk
WARNING! - Btrfs v3.14.1 IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using
Performing full device TRIM (20.00GiB) ...
Turning ON incompat feature 'extref': increased hardlink limit per file to 65536 fs created label (null) on testdisk
$ sudo mount -o nodatacow testdisk mnt/ $ mount /mnt/iscsi-disk/test/testdisk on /mnt/iscsi-disk/test/mnt type btrfs (rw,relatime,seclabel,nodatasum,nodatacow,space_cache)
$ cd mnt $ fallocate test.img -l 1G $ sync $ filefrag -v test.img Filesystem type is: 9123683e File size of test.img is 1073741824 (262144 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 65535: 269312.. 334847: 65536: 1: 65536.. 131071: 334848.. 400383: 65536: 2: 131072.. 196607: 400384.. 465919: 65536: 3: 196608.. 262143: 465920.. 531455: 65536: eof test.img: 1 extent found
$ for id in `seq 1 32`; do dd if=/dev/zero of=test.img bs=4k count=1 seek=$id conv=notrunc,nocreat oflag=direct,sync; done $ filefrag -v test.img Filesystem type is: 9123683e File size of test.img is 1073741824 (262144 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 0: 269312.. 269312: 1: 1: 1.. 32: 269313.. 269344: 32: 2: 33.. 262143: 269345.. 531455: 262111: eof test.img: 1 extent found
$ uname -a Linux dhcp-27-189.brq.redhat.com 3.16.0-rc2-mainline #17 SMP Mon Jun 23 12:28:11 CEST 2014 x86_64 x86_64 x86_64 GNU/Linux
Regards,
Maurizio Lombardi
Quoted 3 lines
I am unable to reproduce the problem on kernel version 3.16.0-rc2 using nodatacow.
I all,
I can confirm that with Fedora 20 x86_64 (kernel 3.14.9-200.fc20.x86_64) the problem do not occour: using the nodatacow option leads to un-fragmented file.
Sorry for the noise.
Signature · 5 lines
Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: [email protected] - [email protected] GPG public key ID: FF5F32A8