This is the mail archive of the
mailing list for the Cygwin project.
SPARSE files considered harmful - please revert
- From: Martin Buchholz <martin at xemacs dot org>
- To: cygwin at cygwin dot com
- Date: Sun, 18 May 2003 15:20:45 -0700
- Subject: SPARSE files considered harmful - please revert
- Reply-to: martin at xemacs dot org
cygwin-patches wants me to be a subscriber to post a patch, but I'm
not ready to become a regular contributor (yet) and you'll likely want
to make this change in a different way, so I'm posting my (obvious)
patch here instead of cygwin-patches.
--------- Message bounced from cygwin-patches follows. -----------
I expect that you can do a better job of undoing Vaclav's patch than
this, but this patch is the one that Worked For Me.
2003-05-18 Martin Buchholz <firstname.lastname@example.org>
* fhandler_disk_file.cc (open): Don't make files sparse.
RCS file: /cvs/src/src/winsup/cygwin/fhandler_disk_file.cc,v
retrieving revision 1.50
diff -u -c -r1.50 fhandler_disk_file.cc
*** fhandler_disk_file.cc 11 May 2003 21:52:09 -0000 1.50
--- fhandler_disk_file.cc 18 May 2003 21:58:48 -0000
*** 408,426 ****
&& !allow_ntsec && allow_ntea)
set_file_attribute (has_acls (), get_win32_name (), mode);
- /* Set newly created and truncated files as sparse files. */
- if ((real_path->fs_flags () & FILE_SUPPORTS_SPARSE_FILES)
- && (get_access () & GENERIC_WRITE) == GENERIC_WRITE
- && (get_flags () & (O_CREAT | O_TRUNC)))
- DWORD dw;
- HANDLE h = get_handle ();
- BOOL r = DeviceIoControl (h , FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &dw,
- syscall_printf ("%d = DeviceIoControl(0x%x, FSCTL_SET_SPARSE, NULL, 0, "
- "NULL, 0, &dw, NULL)", r, h);
set_symlink_p (real_path->issymlink ());
set_execable_p (real_path->exec_state ());
set_socket_p (real_path->issocket ());
--- 408,413 ----
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html