From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 3037B3858D38 for ; Wed, 6 Dec 2023 08:49:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3037B3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3037B3858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::536 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701852595; cv=none; b=uRj/K3Te+KDLOVI25rIXYysW7QLrrjXS8+J7R0AgZIxsQM9uzhlrCwnMxLpU8WuJ/INnrDtBlB5ztrkbVpMpAZDkR7ePmoExtEwKOLI63TrP9R97HvetmIIcMHgaqbQZhI55zSWPdk2ge2kQV+XxDeCdxhMawQbhTWWBSWKXHS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701852595; c=relaxed/simple; bh=/q77Df/1K8lgJBemdFvzjuYY+ner5d/11C20itoa+H4=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=jTGb9hiYy5mtXH6rYGM+o43yEMx+5qluOzhfhQLPPwtJf5ip2nJ7Ap9dsS6CgwRuox/vdZH9n+NmEzPLzLACblLjGxc2IEQJe8xsWRnIRig2IXLn3BHEHRGwShzTwdj0g/QbBZfBOWut24NEsZ0AMUqA4Dn1dpgjEJhugZzwf7s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-54cb4fa667bso4152268a12.3 for ; Wed, 06 Dec 2023 00:49:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701852583; x=1702457383; darn=cygwin.com; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=Qk8cP+2y/ZguNPrtZ6yGRjNqPCVM9k+lpP9lcigCiH0=; b=io3YHYf1rCfD12F5km81pxIUVgoglh2FBcqUHHIPz2B0ehLH1Z5zXmBXqLTy0sQBMD CVvG6Y1kWYauKe9Ti6oWiXJIbdHfkXb9WCF/L48va7QVCrqmjzp+o1o+tKf7J8fEVXyT DY6gtJkKau66tL94s6Ltvt1DIA5jLAowK2EhYDT4Kw/66vHu8If5Il0ZeDEcSZO55UqE 5frplfFaDtKk9IZ+G1hPTJrdfUB9UvWPotFAji608ZnNxo2r6BYXjploLlALXkHeH8YU S/xWGKvo4wtsk2DaEqEVBrAhxwQwhPdGUeqbzpOGg5A3G7MGgmZxwQMtirBg+1qeod2K JnPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701852583; x=1702457383; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Qk8cP+2y/ZguNPrtZ6yGRjNqPCVM9k+lpP9lcigCiH0=; b=p8fpIPkinuw3gbARppLz31+FnixZKr4X7j3DWGmkZdKUPW6BE1zr75RyFc5H8egx/I UVWPejYl082/d44ZFKq7ejjGhScLb7ZC6bH29rwBpFfcoZWWKPOcPxECtFVOqW3uYLO0 8SJtjq4HBsePJ5x2KJnO1tOrKVk5ob7z02fFilqIFw2G28SalRxNEFKP6V2ElZm1FITI o3ZBhgV3ifx8VwPWMG45SgHU9I70DT2JOMVZBkVC5MdXV2uEhq5IfhKwl66w6Y7yt+DL nVMgKWN1y8Tx7lGqFlnIK5ra1jeb9L5GWGFwlDTFAuF4lE6yHeAKIAxQ6BsI208Rhr7a 0eYw== X-Gm-Message-State: AOJu0YxmFwAEsyy+Eaa2Qu1Up/fUefigUV5sft68rgvOMpKdWWRb3R5H Gpkylqg+gGQlNHNaUwmVoAxMXrJjPm8AhNKr6tpf6pYh X-Google-Smtp-Source: AGHT+IHMGC+xbrQd6IE3R+frVVoNb/KVL/IFO1YnKyfrHpH5bvfF/HEtiUptuwaDLI1b2SGrFQYEbxI28F2jgbUppfc= X-Received: by 2002:a50:cd8c:0:b0:54c:4837:8b66 with SMTP id p12-20020a50cd8c000000b0054c48378b66mr344404edi.52.1701852583413; Wed, 06 Dec 2023 00:49:43 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Cedric Blancher Date: Wed, 6 Dec 2023 09:49:00 +0100 Message-ID: Subject: 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? To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 List-Id: On Fri, 1 Dec 2023 at 11:43, Corinna Vinschen via Cygwin wrote: > > On Dec 1 11:12, Cedric Blancher via Cygwin wrote: > > Good morning! > > > > Small comment about 3.5.0 commit "Cygwin: sparse support: enable > > automatic sparsifying of files on SSDs" > > https://cygwin.com/git/?p=newlib-cygwin.git;a=commit;h=832e91422c4ae9b2dcd0c307779f3dd53ee9c0ac > > > > Can this functionality be extended to VMware and QEMU virtual disks, please? > > Not without a complete rewrite and lots of slowing down code. > > VMware and QEMU virtual disks are not exposed to the OS as VMware and > QEMU virtual disks as far as the volume and filesystem information is > going. They are just some arbitrary harddisks managed by some > arbitrary driver. VMware emulates NVME SSD these days, so this should work, yes? Primary concern is how to detect whether sparse file support is ON in Cygwin for a specific filesystem? Maybe /sbin/mount without options should have a sparse/nosparse mount flag to reflect what is used? > > What Cygwin gets to see is that you want to access a file on some > disk. It opens the file and fetches volume information. So it finds: > > - The filesystem returns the FILE_SUPPORTS_SPARSE_FILES > > So we can create sparse files. > > - The volume returns the SSINFO_FLAGS_NO_SEEK_PENALTY flag. > > So we're on a drive having no seek penalty. This is *probably* > an SSD, but may be some other type of drive. What about SMB? SMB supports sparse files, and should certainly use this by DEFAULT, as it makes many HPC apps operate much faster. BUT: SSINFO_FLAGS_NO_SEEK_PENALTY is only for filesystems with a drive, and not for network filesystem. Same applies to the NFSv4.1 filesystem driver, I'm going to pester Roland Mainz to add FILE_SUPPORTS_SPARSE_FILES support, so same issue as SMB here. Ced