DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51FCuKJ82024145 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 51FCuKJ82024145 X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F295A3858019 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F295A3858019 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739623985; cv=none; b=r3HGafC8Oe3va68FVEAbj6J3yH1znuCFVw9e69lTxY4S2RkP50IxQdSbiMQQq1OXZUKP9NBnZv1kKU5JsyIzeEpbHLGmURvAVwYNuQdbP1vZkfY2zaDghbZdLyuEMNRmsl+brKk7xADU16+8Zn2MwgGyg4bvDaw6N7Y1r5285i0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739623985; c=relaxed/simple; bh=UoV/kAIRbpQyInUsWxWjd2hEcDZVUq7PKaoEva1m8Aw=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=N345AAjeQPiEgnxvE4vYdS8EgWO5FpyYdXHxLD2jLC3iA5G9Ut9sEq5aDGtQhBYBqpdiG5PLPy/5rD4uKgqiGk15DfD9H5IzIxEsyk0E22PF0188OGAoovPfx3BEb0DNPLhbYBsKmOtuTGJr1IhwFX+41ibUOqT7KRySAF7z4GI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F295A3858019 Subject: Re: /bin/cp of sparse files broken in 3.6.0-0.362.g68c13dc92f65.x86_64? To: cygwin AT cygwin DOT com References: <0913be67-c8ac-a5ee-50c4-7964d68843d6 AT t-online DOT de> Message-ID: <98bf943a-8a80-dd8d-d515-923ce1f5acf8@t-online.de> Date: Sat, 15 Feb 2025 13:53:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 SeaMonkey/2.53.20 MIME-Version: 1.0 In-Reply-To: X-TOI-EXPURGATEID: 150726::1739623982-B17F999D-C4FA210E/0/0 CLEAN NORMAL X-TOI-MSGID: 6d0674a6-e3d4-4426-9d23-e9f404a2e99c X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Christian Franke via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Christian Franke Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 51FCuKJ82024145 Corinna Vinschen via Cygwin wrote: > On Feb 15 11:17, Corinna Vinschen via Cygwin wrote: >> https://cygwin.com/cygwin-ug-net/using.html#cygdrive > I uploaded the new 3.6 version of that chapter to cygwin.com, btw. > > BTW, the info "sparse ... This flag is always silently enabled on SSD drives" is only here:   https://cygwin.com/cygwin-ug-net/mount.html but not here:   https://cygwin.com/cygwin-ug-net/using.html#mount-table Note that, thanks to Cygwin's support of FALLOC_FL_PUNCH_HOLE, sparse files may also be created on non-sparse mounts if 'cp --sparse=always' is used. In some use cases requiring only single sparse files (e.g. create disk images with dd or ddrescue), it is also possible to preset the sparse attribute. Examples (on HDD): $ uname -r 3.6.0-0.374.g4dd859d01c22.x86_64 $ cp --version cp (GNU coreutils) 9.6 Packaged by Cygwin (9.6-1) ... $ dd if=/dev/zero bs=1M count=1 >file; echo EOF >>file $ cp file file-cp $ cp --sparse=always file file-cp-sparse-always $ dd if=file conv=sparse of=file-dd ... $ >file-dd-chattr-sparse $ chattr +S file-dd-chattr-sparse $ dd if=file conv=sparse,notrunc of=file-dd-chattr-sparse ... $ lsattr file* ---a---------- file ---a---------- file-cp ---a-S-------- file-cp-sparse-always ---a---------- file-dd ---a-S-------- file-dd-chattr-sparse $ stat -c "%5b %s %n" file*  1028 1048580 file  1028 1048580 file-cp    64 1048580 file-cp-sparse-always  1028 1048580 file-dd    64 1048580 file-dd-chattr-sparse On a SSD, 'file-dd' would also be sparse. -- Regards, Christian -- 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