On Fri, 1 Dec 2023 at 11:43, Corinna Vinschen via Cygwin
<cygwin@cygwin.com> wrote:
>
> On Dec  1 11:12, Cedric Blancher via Cygwin wrote:
> > Good morning!
> >
> > Small comment about 3.5.0 commit "Cygwin: sparse support: enable
> > automatic sparsifying of files on SSDs"
> > https://cygwin.com/git/?p=newlib-cygwin.git;a=commit;h=832e91422c4ae9b2dcd0c307779f3dd53ee9c0ac
> >
> > Can this functionality be extended to VMware and QEMU virtual disks, please?
>
> Not without a complete rewrite and lots of slowing down code.
>
>   VMware and QEMU virtual disks are not exposed to the OS as VMware and
>   QEMU virtual disks as far as the volume and filesystem information is
>   going.  They are just some arbitrary harddisks managed by some
>   arbitrary driver.

VMware emulates NVME SSD these days, so this should work, yes?

Primary concern is how to detect whether sparse file support is ON in
Cygwin for a specific filesystem? Maybe /sbin/mount without options
should have a sparse/nosparse mount flag to reflect what is used?

>
>   What Cygwin gets to see is that you want to access a file on some
>   disk.  It opens the file and fetches volume information.  So it finds:
>
>   - The filesystem returns the FILE_SUPPORTS_SPARSE_FILES
>
>     So we can create sparse files.
>
>   - The volume returns the SSINFO_FLAGS_NO_SEEK_PENALTY flag.
>
>     So we're on a drive having no seek penalty.  This is *probably*
>     an SSD, but may be some other type of drive.

What about SMB? SMB supports sparse files, and should certainly use
this by DEFAULT, as it makes many HPC apps operate much faster.
BUT: SSINFO_FLAGS_NO_SEEK_PENALTY is only for filesystems with a
drive, and not for network filesystem.

Same applies to the NFSv4.1 filesystem driver, I'm going to pester
Roland Mainz to add FILE_SUPPORTS_SPARSE_FILES support, so same issue
as SMB here.

Ced

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