diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2023-11-30 22:36:35 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-11-30 22:37:35 +0100 |
commit | 832e91422c4ae9b2dcd0c307779f3dd53ee9c0ac (patch) | |
tree | 0d36ea9890619b32e82b0df10d9f9842cb1509cd | |
parent | 8b01c5d6903fbcbb14c52db45c12494b53493c5a (diff) | |
download | newlib-832e91422c4ae9b2dcd0c307779f3dd53ee9c0ac.zip newlib-832e91422c4ae9b2dcd0c307779f3dd53ee9c0ac.tar.gz newlib-832e91422c4ae9b2dcd0c307779f3dd53ee9c0ac.tar.bz2 |
Cygwin: sparse support: enable automatic sparsifying of files on SSDs
Given that SSDs don't have a seek penalty, we can enable
automatic sparsifying of files on SSDs, even if the "sparse"
mount option is not set.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/local_includes/path.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/release/3.5.0 | 3 | ||||
-rw-r--r-- | winsup/doc/new-features.xml | 5 | ||||
-rw-r--r-- | winsup/doc/utils.xml | 1 |
4 files changed, 11 insertions, 2 deletions
diff --git a/winsup/cygwin/local_includes/path.h b/winsup/cygwin/local_includes/path.h index c7f113f..d19721e 100644 --- a/winsup/cygwin/local_includes/path.h +++ b/winsup/cygwin/local_includes/path.h @@ -174,8 +174,8 @@ class path_conv bool isgood_inode (ino_t ino) const; bool support_sparse () const { - return (mount_flags & MOUNT_SPARSE) - && (fs_flags () & FILE_SUPPORTS_SPARSE_FILES); + return (fs_flags () & FILE_SUPPORTS_SPARSE_FILES) + && (fs.is_ssd () || (mount_flags & MOUNT_SPARSE)); } int has_dos_filenames_only () const {return mount_flags & MOUNT_DOS;} int has_buggy_reopen () const {return fs.has_buggy_reopen ();} diff --git a/winsup/cygwin/release/3.5.0 b/winsup/cygwin/release/3.5.0 index 3b6df95..d0a6c2f 100644 --- a/winsup/cygwin/release/3.5.0 +++ b/winsup/cygwin/release/3.5.0 @@ -55,3 +55,6 @@ What changed: https://www.austingroupbugs.net/view.php?id=1674 - FIFOs now also work over NFS. + +- Enable automatic sparsifying of files on SSDs, independent of the + "sparse" mount mode. diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index c5e6cdd..56509bd 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -82,6 +82,11 @@ New API call: fallocate (Linux-specific). FIFOs now also work over NFS. </para></listitem> +<listitem><para> +Enable automatic sparsifying of files on SSDs, independent of the +"sparse" mount mode. +</para></listitem> + </itemizedlist> </sect2> diff --git a/winsup/doc/utils.xml b/winsup/doc/utils.xml index ad17c97..f79a928 100644 --- a/winsup/doc/utils.xml +++ b/winsup/doc/utils.xml @@ -1933,6 +1933,7 @@ D: on /d type fat (binary,user,noumount) (default). sparse - Switch on support for sparse files. This option only makes sense on NTFS and then only if you really need sparse files. + This flag is always silently enabled on SSD drives. text - Files default to CRLF text mode line endings. </screen> |