From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id DF7163858D20 for ; Thu, 10 Aug 2023 02:43:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DF7163858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5236a9788a7so495046a12.0 for ; Wed, 09 Aug 2023 19:43:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691635403; x=1692240203; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=29l2uZjo6WJu6n91rrjK5odGoC3N2Vfnb5xFSSH8apI=; b=hOUn3WLlFLXpItMVurnS6vKUrw912e+6fWEjDoMH/54LDlKbUN7/SbYgGgbQiiJubw wvvAFp3cN2pi4p36fSwJWBc0qFQHIh8O/wBJbRkh3dupp6+HwBvjHk/jIdA1tDJVTJVA VJqOBPUWmvu/ctdYQN7fk/qsoyeoKthZpP9uOTeeI9MCGd/CK5vAZrGTPTjorF4OJAR5 wdBoeOavUfHyiC/QFQ9r1WsC27owfDswcikscMVdJiL/s526X7kixr4pYUVnM2GC6toy Q71qO5dNisGCB7Pfizs4ng1PQtatwoGk4nxRJadq+tYmZjURYLqhqd5EF24x3tPjvCri qnxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691635403; x=1692240203; 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=29l2uZjo6WJu6n91rrjK5odGoC3N2Vfnb5xFSSH8apI=; b=TW3HAdr5Z81NCPebssrQ5WPXoWe+jRmMOMXuuSg+a1sDe3ybOzGC2+o27s7W/DdLBl dP1Rn+LQdJ1PZ6JoqiQLznrBhgEgdejF1IlhZHP4ItTbT27j5fCA57SWV0aVV2bDjWdU K5bNqOpA+7gNotqMIbX8dvo2pBC30X7mvM5aMbSO/An7BLsezBRjFgTLMMG2n9XHDMoB hp8OKdROY+gB/vlr5Gjnyf0NZvHTBENP7pMMMaqk7cIkLoQqRuVJ5C1Zmj90l/Elbi5h vtxxb3gCkaQBUssZ1aBDhqR2c1UTliLYdq5q8EOM4U4VI9EgObcfbBWMRjZW+ZMhoy5J tr9g== X-Gm-Message-State: AOJu0Yxu2MQz0/7rPSNiyOz0btoDHBJKHSJ1oyp6mkdTtpbjnhCYOxuk L0PaywJgdQknZOlO7suukeAqzD0bhIPa9UGFpxOoaMoVLacgGA== X-Google-Smtp-Source: AGHT+IEZugmMZew3bMkUFwNSJsIYOvx2FOhW9bDmDqxSzL7qY8lhUhwS6p91nKEYAcMFjDNQ2s3T7sUw+ZEzuVL97fo= X-Received: by 2002:a05:6402:31eb:b0:523:3609:d3ca with SMTP id dy11-20020a05640231eb00b005233609d3camr943489edb.20.1691635403137; Wed, 09 Aug 2023 19:43:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Cedric Blancher Date: Thu, 10 Aug 2023 04:43:10 +0200 Message-ID: Subject: Re: SEEK_HOLE Support in Cygwin? To: cygwin-developers@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,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 Wed, 9 Aug 2023 at 17:30, Corinna Vinschen wrote: > > On Aug 7 10:33, Corinna Vinschen wrote: > > Wrong mailing list, use cygwin AT cygwin DOT com for user questions. > > > > On Aug 6 19:14, Cedric Blancher wrote: > > > Good evening! > > > > > > Are there plans for a SEEK_HOLE support to Cygwin, e.g. on top of the > > > FSCTL_QUERY_ALLOCATED_RANGES api (if appropriate)? > > > > No plans, but patches are welcome. This looks like a fun task for a > > rainy weekend. > > Today was a really rainy day and I had to wait for a test system to > come up, so I hacked on SEEK_DATA/SEEK_HOLE support. > > Check out the next Cygwin test release 3.5.0-0.384.g9939aa7d0945. Thank you! Or should I thank the weather gods? ;) How can I download this version? > > Note that this defaults to the default behaviour described in the > Linux man page, see https://man7.org/linux/man-pages/man2/lseek.2.html > > I.e., "In the simplest implementation, a filesystem can support the > operations by making SEEK_HOLE always return the offset of the end of > the file, and making SEEK_DATA always return offset" So this supports multiple holes in one file, right? > > The real deal obviously requires a filesystem supporting sparse files, > *and* it requires that you access the file via a mount point with the > "sparse" option set! The mount option "sparse" is not set by default. Why is "sparse" not the default mount option? Ced -- Cedric Blancher [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur