Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16072.1853.537466.786053@gargle.gargle.HOWL> Date: Sun, 18 May 2003 15:20:45 -0700 From: Martin Buchholz To: cygwin AT cygwin DOT com 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 * fhandler_disk_file.cc (open): Don't make files sparse. Index: fhandler_disk_file.cc =================================================================== 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, - NULL); - 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 Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/