public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: Cedric Blancher <cedric.blancher@gmail.com>
Cc: cygwin-developers@cygwin.com
Subject: Re: SEEK_HOLE Support in Cygwin?
Date: Wed, 9 Aug 2023 17:30:49 +0200	[thread overview]
Message-ID: <ZNOxKYsTkrxNwmLW@calimero.vinschen.de> (raw)
In-Reply-To: <ZNCsZAGALwMFdml6@calimero.vinschen.de>

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.

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"

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.


Corinna

  reply	other threads:[~2023-08-09 15:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06 17:14 Cedric Blancher
2023-08-07  8:33 ` Corinna Vinschen
2023-08-09 15:30   ` Corinna Vinschen [this message]
2023-08-10  2:43     ` Cedric Blancher
2023-08-10  8:28       ` Corinna Vinschen
2023-08-21  4:33         ` Cedric Blancher
2023-08-21  8:32           ` Corinna Vinschen
2023-08-24 12:03           ` Roland Mainz
2023-08-25  9:05             ` Corinna Vinschen
2023-08-25 11:09               ` Roland Mainz
2023-08-25 11:23                 ` Corinna Vinschen
2023-08-25 11:43                   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZNOxKYsTkrxNwmLW@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cedric.blancher@gmail.com \
    --cc=cygwin-developers@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).