X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2071D38449D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1701787722; bh=ZNAR1G+kpG3CUfjpBMzihWgwpxhygLSSf/BdMyecurs=; 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=hhu8IONCbvy2PbxcuUkmM0tMMAQAMU26QMtGUsG0LlqqeL17BwlWAJcZgWo1Et/jY 3PubRd4lbEB8m/jT3mCn8o16dphr4QlsvIQSg/4n3wGgSJkiWRkHpvAiONdEa+6r7Z LgHZ/00GF3TRISLioI4nEJQhRxDzcidh92n74psU= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA7C93858426 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BA7C93858426 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701787686; cv=none; b=Vz9YuBSmLKUw+n6SNzTwU+hBQZGdXig7CwZ8MXwRVCkQVGFObulPdwv3DZ7qOYFDhIQQVkrCo8WJIEXU6iU/XFqbZVuKRcyYKW9qeqHAa8jqoKW583eEaR2XLthRpV97QYv4jdALPwkcz5jjGQYaRHwS6SydVLctADRfsAv+/u4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701787686; c=relaxed/simple; bh=XckIl8XnFHNWZs8xlvPMyFVDxP1ORl6kmzC2+dpbG0E=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=ghzmDX2wgL4kDxoWUGei0JH5ua4bhE2VSQNtRC3GFkMFbLCgRvCZhEV1l/G7aTmjq7kntiKZd3djHrA2bIory55cB+vCTCJe+6qYOIyWqEgLJw8AGHfwhzSb4C/qf5J8uvNcNbBGoHcLaGPD84fqzJTRkCtGAYGA980ESgFJV+Q= ARC-Authentication-Results: i=1; server2.sourceware.org Message-ID: <06bd1d13-7d60-4e45-b597-70816a2ad559@towo.net> Date: Tue, 5 Dec 2023 15:47:58 +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: <33d4b0df-7a6a-40cf-85a2-9a4300198672 AT towo DOT net> <12e1d9d9-bc56-456e-a1ab-c760987f3ac2 AT towo DOT net> 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 5wSnAU3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ci1xaXRKEiSPjHdSGGVB1PFIcqiS75GCf/ga/Dnfsy0Y4Uh6OGTQnkvZLBCe3vvcVLDQ7F PuV79zA9/eOeOW6aGoO6bq/wH+z96f9LyTITkQDy07fm6JYTGuzAoJE2AEboU1mgbtlx+tAa QFkpAQkp2g1Vhc3A7k4vntlHOrjMC+uVFh7QTGFfIlLRF6izUjSe6EZ06LErzlIiE05RP3yF FSRWidW0wze26peYlxYVgH1+T9wMTW2oiTBybfAMHBAxUP7Gr1WUo/oJEr0srWhatz8AwydP y7NwFbdpYn0NcFBaIlLW/JL11Eovwlivow+oGpzGFuuzSuflp2q9s2JWtn4EhW0kEs93D0LP iuJWvRaCZ6aD3uF3FMW8wyVWZYsLrzune2jH8w/uKMprDEOGOm+BcyhEFedTyY1ygbZKl+0G kQ== In-Reply-To: <12e1d9d9-bc56-456e-a1ab-c760987f3ac2@towo.net> X-Provags-ID: V03:K1:IybQodp7ICOd/2upTI0XJVjcGTFJPxYoKbKpA4D35mwYABUPDF1 Kua/7B3254EACMW+AWQ5+Cpitr9tFMXzf+QdgnqQ7uSoDK+9SgoMOmCMMtmL0XypYsxEZkH VqzCe2yt3LCB1MPRMqq/8IFImA+ywVKfHXlIbXCkBdVdFXby+8z1ihZRb6QuU1h1wvMxUZx aWOW0Flj7r2uOOvqQ7JTQ== UI-OutboundReport: notjunk:1;M01:P0:ag8e5tyFBl0=;7L8GOv/jGG1EB0r5upre5REwU9L YWuFNe1olgFudElguo4MsdveR3vN9IosZwa7GlTjifzgBeHEbD+PEhYe3NoiX3pBxQpTifUcw gfaJv2Xjw4qsvu0y5Eu1gcXa2SQnvSTE99bKCr0xXyK8N5YWQJItBesvdyfXaidjZo6Mgst0z JnLiU2xFoLUFQvR61dH+Y4xT4tumCkMB9XV1WmsuwQP962HFPXcK+qofy8Cgaz8+sIRb0soeD bxP4DDovFsFptQCaumvAEOk4jlxJ9hPF0pX95emB1SwAlQbSv2VSk4SZp84JsWMsr7hVH6zde pPIojYXhT4PXk7ZTMuwk2JMVTWOSUrh77B85EvheydHAaLg0P8DrsqP1MvvlSwJwKQrLlk737 6hOimPmnMAx/t+ZMI7QMS5eeWp6pu00Df8j8X7PSDLDx5I8Tqvi25rHdrtdOmQPtxA5o0j3Kf oivzC0rxVBxE3fC95hRxF/JGB0tuJHU44K+DDIJNRdDXsZwihJ3RqLWsKgS7tHAHLlFnvmLBL uGsXAWVz2P9NFBnQqjCvyCmciOmYgkKa1sxI8IciUbGHWULWlb6+dpMjTFFglUCsGTA6MqNUA EifhPfQlYtULvQw8s7o6mGhKEQ1Ii+/JlFbafXzQpi1Efk/LjbXS9EhjxS/O62WpIRr9juQlJ ouRtnd7oBU8iYDINMimtwlYIUWgiHoAqW+UzTMlk4pqZxkCAEi8AOckCHT7fJQJXtIyKeDlgY NNajP4pbz9wGIp9u0KnMxcTnvlkHZAfv9JX3nXqcs0FT3BO/zgNLqqaMRXU4SpWwQvBaB0Exa p4o8CkJFPYwLHaj8V1ot1Cf3sLD2S1Ftcl5RdQog1O50mL/kqD6OQ6s3d6By/KXotjsOO/0qN kjzDKshfb5nRIJQ== X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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-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 3B5EmgAK004718 Am 05/12/2023 um 15:40 schrieb Thomas Wolff via Cygwin: > Am 05/12/2023 um 14:53 schrieb Corinna Vinschen via Cygwin: >> On Dec  5 07:36, Thomas Wolff via Cygwin wrote: >>> >>> 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. >> Is that a local NTFS, did you actually call >> >>    chattr +S x >> >> after touching the file, and did you check with >> >>    lsattr x >> >> that x is actually sparse? > Ups, sorry, I was just throwing my 2p into something. Yes, on a local > NTFS; setting chattr +s does not change it but lsattr says: > ---a-------- .ls-s > > So why does chattr not seem to work? Sorry again, I failed to test properly (I had copied your `chattr +S x` which is not the filename I tested... blush). With chattr +S, I reproduce your observation. > Thomas > >> 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