Corinna Vinschen via Cygwin wrote:
On Feb 15 11:17, Corinna Vinschen via Cygwin wrote:
https://cygwin.com/cygwin-ug-net/using.html#cygdrive
I uploaded the new 3.6 version of that chapter to cygwin.com, btw.
BTW, the info "sparse ... This flag is always silently enabled on SSD
drives" is only here:
https://cygwin.com/cygwin-ug-net/mount.html
but not here:
https://cygwin.com/cygwin-ug-net/using.html#mount-table
Note that, thanks to Cygwin's support of FALLOC_FL_PUNCH_HOLE, sparse
files may also be created on non-sparse mounts if 'cp --sparse=always'
is used.
In some use cases requiring only single sparse files (e.g. create disk
images with dd or ddrescue), it is also possible to preset the sparse
attribute.
Examples (on HDD):
$ uname -r
3.6.0-0.374.g4dd859d01c22.x86_64
$ cp --version
cp (GNU coreutils) 9.6
Packaged by Cygwin (9.6-1)
...
$ dd if=/dev/zero bs=1M count=1 >file; echo EOF >>file
$ cp file file-cp
$ cp --sparse=always file file-cp-sparse-always
$ dd if=file conv=sparse of=file-dd
...
$ >file-dd-chattr-sparse
$ chattr +S file-dd-chattr-sparse
$ dd if=file conv=sparse,notrunc of=file-dd-chattr-sparse
...
$ lsattr file*
---a---------- file
---a---------- file-cp
---a-S-------- file-cp-sparse-always
---a---------- file-dd
---a-S-------- file-dd-chattr-sparse
$ stat -c "%5b %s %n" file*
1028 1048580 file
1028 1048580 file-cp
64 1048580 file-cp-sparse-always
1028 1048580 file-dd
64 1048580 file-dd-chattr-sparse
On a SSD, 'file-dd' would also be sparse.
--
Regards,
Christian
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple