www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/02/13/03:02:40

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51D82ek41120286
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 51D82ek41120286
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=hdbNqxSR
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81D67385840B
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1739433758;
bh=tZrJ4g3eknHkUornpvm0dSeRtHFEJXGuOjG8wx0vV28=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=hdbNqxSRjFe4OtWKe8/Vq49hcy8fD+R8MsDAdY+WjjNPduOxpiIJxUTILDpCsvMBG
fLO861vHfM/qZt/W7AR5P0oaE4MMc6SESrPRfohF17639UfxCkRwOPI+OZ6JhcuEfv
wGmkPxwOVFOt3fm0Ts1j9sFQlyQpCFyqMHhW5hqY=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D57053858D20
Date: Thu, 13 Feb 2025 09:02:16 +0100
To: cygwin AT cygwin DOT com
Subject: Re: /bin/cp of sparse files broken in
3.6.0-0.362.g68c13dc92f65.x86_64?
Message-ID: <Z62nCFBMp4MVbL2p@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CALXu0UdYOUeFSF0GXtqccbA=ZeQQEn62y5MBdEdJPVCkHHXgrw AT mail DOT gmail DOT com>
<Z6zasFeEi1cavLyr AT calimero DOT vinschen DOT de>
<0913be67-c8ac-a5ee-50c4-7964d68843d6 AT t-online DOT de>
MIME-Version: 1.0
In-Reply-To: <0913be67-c8ac-a5ee-50c4-7964d68843d6@t-online.de>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On Feb 12 22:34, Christian Franke via Cygwin wrote:
> Corinna Vinschen via Cygwin wrote:
> > On Feb 12 17:32, Cedric Blancher via Cygwin wrote:
> > > Good afternoon!
> > > 
> > > Is copying sparse files broken in 3.6.0-0.362.g68c13dc92f65.x86_64?
> > > 
> > > cp --version
> > > cp (GNU coreutils) 9.5
> > > Packaged by Cygwin (9.5-1
> > > 
> > > Checklist:
> > > - Volume has FILE_SUPPORTS_SPARSE_FILES
> > > - Cygwin mount has "sparse" option (mount Y: -o sparse,exec /cygdrive/y)
> 
> Do all mount points below /cygdrive have 'sparse,exec' set?
> 
> If not, this may not work because different mount options for individual
> /cygdrive/s are not supported (AFIAK).
> 
> 
> > > - source file has FILE_ATTRIBUTE_SPARSE_FILE set
> > > 
> > > But  cp --sparse=auto ... or any other combination of --sparse does
> > > copy holes, i.e. turns 500GB of hole into 500GB of data (zero bytes).
> > > 
> > > echo "hello sparse file\n" >testcase17_sparse_begins_with_data && dd
> > > if=/dev/null of=testcase17_sparse_begins_with_data oflag=append bs=1
> > > count=1 seek=$((65536*512)) && echo "endoffile"
> > > > > testcase17_sparse_begins_with_data
> > Works for me:
> > 
> > $ uname -r
> > 3.6.0-0.362.g68c13dc92f65.x86_64
> > 
> > $ pwd
> > /home/corinna/tmp
> > 
> > $ mount | grep tmp
> > C:/cygwin64/home/corinna/tmp on /home/corinna/tmp type ntfs (binary,sparse,user,bind)
> 
> This mount is independent from /cygdrive. That may make the difference.

You're right!  I didn't notice this.

This:

> - Cygwin mount has "sparse" option (mount Y: -o sparse,exec /cygdrive/y)

doesn't work:

  $ cat /etc/fstab
  Y: /mnt/y binary,posix=0,sparse 0 0
  none /mnt cygdrive binary,posix=0 0 0
  $ mount
  [...]
  Y: on /mnt/y type ntfs (binary,posix=0,noumount,auto)

As you can see, the options for drive Y are ignored and the options
for the cygdrive prefix are used.  This is even documented in a special
note in https://cygwin.com/cygwin-ug-net/using.html#cygdrive

Thanks for pointing this out, Christian!


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

- Raw text -


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