On 2025-02-12 09:32, Cedric Blancher via Cygwin wrote:
Is copying sparse files broken in 3.6.0-0.362.g68c13dc92f65.x86_64?
cp --version
cp (GNU coreutils) 9.5
Packaged by Cygwin (9.5-1
Checklist:
- Volume has FILE_SUPPORTS_SPARSE_FILES
- Cygwin mount has "sparse" option (mount Y: -o sparse,exec /cygdrive/y)
- source file has FILE_ATTRIBUTE_SPARSE_FILE set

But  cp --sparse=auto ... or any other combination of --sparse does
copy holes, i.e. turns 500GB of hole into 500GB of data (zero bytes).

echo "hello sparse file\n" >testcase17_sparse_begins_with_data && dd
if=/dev/null of=testcase17_sparse_begins_with_data oflag=append bs=1
count=1 seek=$((65536*512)) && echo "endoffile"
testcase17_sparse_begins_with_data

Does that include --sparse=always not creating holes, and how are you checking whether the file is stored as sparse with holes or not - should this be visible in dir/ls file sizes?

It may be unsupported in Cygwin cp (coreutils) - build tests detect insufficient? SEEK_DATA support, inability to create large sparse files, and the (NTFS) file system as not supporting sparse files.

--
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                -- Antoine de Saint-Exupéry

--
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

Reply via email to