delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/02/01/08:52:37

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <41FF88C8.5060604@byu.net>
Date: Tue, 01 Feb 2005 06:48:56 -0700
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Fwd: Re: cp command - problem with sparse
X-IsSubscribed: yes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This question came up on the coreutils list:

Does cygwin provide any support for sparse files on NTFS volumes that
support it?  lseek() could be patched to use FSCTL_SET_ZERO_DATA when a
seek jumps past the end of a file open for writing, but there is still the
issue of when that file is given the FSCTL_SET_SPARSE attribute.

- -------- Original Message --------
Subject: Re: cp command - problem with sparse
Date: Tue, 01 Feb 2005 10:17:01 +0000
From: jay AT excession DOT spiral-arm DOT org (James Youngman)
To: RE <eicher_und_bergmann AT yahoo DOT de>
CC: bug-coreutils AT gnu DOT org
References: <EGECIPGBMFENJDOHIEMIAEMGCBAA DOT eicher_und_bergmann AT yahoo
DOT de>

On Mon, Jan 31, 2005 at 05:30:22PM +0100, RE wrote:

> "cp --sparse=always c:\test.cfg c:\test2.cfg"
> 
> Everything works fine with that cp command, except the 
> fact that I do not get a sparse file.  Even when I copy 
> a sparse file, the sparse attribute is no longer 
> present in the copy an the occupied space on my HD is 
> the same as with the original file.
> 
> What am I doing wrong?
> 
> I tried already different PCs with NTFS (OS = Win2k 
> SP4)

Unix systems automatically generate sparse files when programs seek
forwards on their output file.  There is no need to have a "sparse"
attribute.  This is what coreutils' "cp" does.

Windows and NTFS don't work in this way.  Under NTFS, there is, as you
say, a "sparse" attribute which must be set.  GNU coreutils runs on
Windows under Cygwin and am not sure if Cygwin exposes any form of API
which might allow cp to set the sparse attribute.  It's certainly a lot
more complex to do this under Windows.


See
http://www.ntfs.com/ntfs-sparse.htm
and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/fsctl_set_zero_data.asp


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils AT gnu DOT org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB/4jI84KuGfSFAYARArbqAKC8oMiDsvW93G9xZpZtjcIcFxPeRACeNti6
iWWYrjHN7i1YlvfKMNLqps8=
=CLd3
-----END PGP SIGNATURE-----

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019