X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3F12385842A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1701858293; bh=1bPdCJXyCD3KkIHx+c6JGYrijk4DcG0InN7JwpOw6+g=; 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=kliNQxh0hk7gFhwCG1p9WGxnFYYvjhXq0vEaGLksrYRlf1wTyZkD4bumnx9rljeFP 4jTZ0aTUP6WKqvrwX2cvJ4ZjANqMwiGf5zzQNrqxfL00BoytkyiqZwxG4eNQT1Yj9E 4DunIGs1zs74aypq9O9BQXCnX47gr0+a50NzqST0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 926703858D38 Date: Wed, 6 Dec 2023 11:24:16 +0100 To: cygwin AT cygwin DOT com Subject: Re: Sparse file support for SMB by default? Re: Comment about "Cygwin: sparse support: enable automatic sparsifying of files on SSDs", extend feature to VMware/qemu disks? Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Dec 6 10:38, Corinna Vinschen via Cygwin wrote: > Again, the filesystem doesn't matter. It either sets the > FILE_SUPPORTS_SPARSE_FILES flag or not, as simple as that. > > If it does, you can create sparse files with chattr +S, or you can rely > on the lseek/ftruncate/posix_fallocate automatism, or you stamp a hole > into the file with fallocate(FALLOC_FL_PUNCH_HOLE). > > The *only* difference is if you have to use the "sparse" mount option or > not. > > Basically, with 3.4, you always have to set the "sparse" mount option, > with 3.5, on local SSDs you don't. I don't see a problem here. Oh, and to be very clear here: This *only* affects new files or files which are not yet sparse. As soon as a file is sparse, it stays sparse. Subsequently, the way sparse blocks are created or converted to allocated blocks during write, lseek, ftruncate/posix_fallocate depends solely on how the OS and the filesystem driver perform in this matter. Cygwin is out of the picture then. After all, it's still just a user space DLL. 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