X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 71B40384646A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1701759729; bh=rTBZQYTnj/NrtkariGgk+I1ejAFGZVXS3JV/VCHf0xc=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=axxD4J59TkG0v490YbEdorWXnp+yvu/9S4DAt4u90chg2wVkktXO3hIjrm3OF1rEM mQ/M/IH0WNiQM5gSMzEEIE/SRGGzStgajxVmpv+nWTmc3XF5R0ojO4KsYMDODgKy0G YCOferB7fc9RQanQa7/CXVsPlC4Xo8vgYM36Er6Y= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D0AD6386181F ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D0AD6386181F ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701759693; cv=none; b=qiKJpBxCCkAivONp4D/K76pBy5NXQqvhb1ENUunFvpXm9l641GKa5V68XKerD5XE/K1t4Q1WDupFbTSwTp3dZvbrO44SSc8lDqi1uG3cMG+S1xY0ObJgWRpS6zYSQ5py9vq3gPVmZp9HaAY2pXOcDdIns+G7G6Z2hMUqaU+QF8w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701759693; c=relaxed/simple; bh=OxWmBF7acXoakPuzj16W7FeTaiklotVIV21siFx47ds=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=v8QAZYqbf4lfJjOy8sKN/nJc+sbkOkYEmrHS41T4gLR9TTBfN6C1LMHgDPJ6zuECNz2KOegOKlY1g3xXzmP+rnij+tEF1Kew7dICvyU9lawp8Wom+lHdkO+LmGZr6+dXifK3SPfeDPvEmxeEX1yvhfZxoxgCffOFst0dX7pq/kE= ARC-Authentication-Results: i=1; server2.sourceware.org Message-ID: <33d4b0df-7a6a-40cf-85a2-9a4300198672@towo.net> Date: Tue, 5 Dec 2023 07:36:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cygwin api to punch a hole into a file? To: cygwin AT cygwin DOT com References: Autocrypt: addr=towo AT towo DOT net; keydata= xsDNBGNaf3QBDACVevqudcTSevLThXKQPU1QpaDxtGuYjtwmr7i9wXxVGih4Y4oxOJN4PYlu KBX9IVAI4651dA+xYtXuyIkWOPZWyyzkGKavQOn3Q7dk09oj7bh2IwOndpxXXde337D408EQ bQEGbMHr9lOWhSAideowzgCeFIvGTf2AovbPh97HpexJn1/HCRiRAhTNlrkS1DByUgCAeEMK fEr6aGM/Ou29MT+eTnQwOIZTnl9Z9LxM2FtqqMH3MycC7I2OoW3XXhuL8BPQdyJUjWa0/J11 Oo5jFkRXtWenIns6jGn18oW72jnDmo9jXwwS+iZWAV6Y51nhD7jSC+3xs9ORmPCdtHUSpTr1 zh67UueUJ3DUUNVuA25Hn/9EJMJ2L60BGUEr88NEB6pcZhmcwdkurAQeYT6t+frzBz2ctsoN BoxP/Xc02yd+z7hXWRRMrJWh9WHlQHA3Z4FfmyNhyPhs3MgKTJ1E9QfzGquigAmF3/k/Dc1m 7cSOKhGYhpEJdSpdXccJFKkAEQEAAc0cVGhvbWFzIFdvbGZmIDx0b3dvQHRvd28ubmV0PsLB BwQTAQgAMRYhBHUiRKsHn5d8BpWdP8bz0e72Bp0CBQJjWn93AhsDBAsJCAcFFQgJCgsFFgID AQAACgkQxvPR7vYGnQKSMAv8Di+8MXB2mcfsemRdShfLLKcLOv+d0CXAtPVaY3XKxbKpRvC9 +AAT5wIHYjQft77/b2y87vGIh+nQ5hKLtNtQPSDtqG/Igkb5jAXpLi28fSUzgM96DvARmwve 5wSnAU3prxH+Y63YpOpslEcGMRoEtYCDy1ANMYPcEZT/YvDd4CplyyEai4VYrw3/LsESDYlY GK6uMQzZ1jl2cNOUFu6BwLUe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0lial8GyTFS DUBYGXwEUGyM+orr6znN1fjn20cjotNeTrCWDqbE4VzOduvfO2VOL2XB4YgdZh/+IuebQyesH T/X6xyKH2QtzZH4FvwvNndbDc3e7hd9ms7p5H/tqJ9QrFQNXp6T1uP9kQfvB3Q9SzK69GxEEu PdRiPrQe3sAMv7f4yk6MVWZhPvoNg5skyoCkysbs6FuiN69Cb+G/tOSay4+viwpKqL+/xw7on efXUWbJRYl6GSli6FUg19ZnxTtrnl3dpJ+pNWZ+3RhykfrheDg5iPlW2uzp/SoZJiV76Bxdr7 bK04oyZeXjJAzRn3B34l+DLTfiqWV4c94rreo33EqVSeIt+eoBKqtcgozNic3y+ARU8mgy5Nl 2DWBWtr+ISKRfAxbmQU2mryDJt5qpLu44B8lPknT3HC1jgus2n7r0qQ9lbiOXVDbBeOAHhrnZ XGye/sAd4x9zaPg== X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00, HTML_MESSAGE, KAM_DMARC_STATUS, KAM_LOTSOFHASH, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.30 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: Thomas Wolff via Cygwin Reply-To: Thomas Wolff Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Am 01.12.2023 um 12:02 schrieb Corinna Vinschen via Cygwin: > On Dec 1 11:22, Cedric Blancher via Cygwin wrote: >> Not all filesystems have a 128k block/stripe size, and certainly most >> filesystems have smaller minimum hole sizes than 128k (e.g. 512bytes >> is common, ref pathconf _PC_MIN_HOLE_SIZE). > There's no _PC_MIN_HOLE_SIZE in Linux or POSIX. In Windows, a sparse > file uses chunks of 64K. You can see this even with a file of just > a single block. Try this: > > $ touch x > $ chattr +S x > > $ echo 1234567890123456789012345678901234567890123456789012345678901234567890123456789 >> x > $ ls -ls x > 1 -rw-r--r-- 1 corinna vinschen 80 Dec 1 11:56 x > > [repeat echo and ls -ls until...] > > $ echo 1234567890123456789012345678901234567890123456789012345678901234567890123456789 >> x > $ ls -ls x > 1 -rw-r--r-- 1 corinna vinschen 720 Dec 1 11:56 x > $ echo 1234567890123456789012345678901234567890123456789012345678901234567890123456789 >> x > $ ls -ls x > 64 -rw-r--r-- 1 corinna vinschen 800 Dec 1 11:56 x2 > ^^ > This For me, it goes up from 1 to 4, then in steps of 4KB. > I don't know how Windows stores short files, maybe they are part of the > metadata up to a point or some such. However, as soon as you raise the > size over a given point, the *allocation size* will be rounded up to 64K > and from that point on, it will be in 64K chunks. Also sparsifying and > desparsifying of blocks only works in 64K chunks. > > > 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