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.

  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.

That's it!

So the decision made is now:

- Does the current file action (fallocate, write after lseek)
  create a hole in the file which is big enough to fit a sparse
  block into it?

- If yes, does the filesystem support FILE_SUPPORTS_SPARSE_FILES?

  - If yes, is it on a volume having no seek penalty?

    - If yes, make the file sparse.

    - If no, is the "sparse" mount option set?

      - If yes, make the file sparse.

> Also, does Cygwin have a syslog where people can check whether the
> feature is on or off?

We have a syslog API for applications, like services, which utilze it.
The Cygwin DLL itself doesn't use it.  That would flood either a syslog
daemon, or the Windows logs with 99.9% unnecessary info.


Corinna

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