From: Cedric Blancher <cedric.blancher@gmail.com>
To: cygwin@cygwin.com
Subject: Cygwin api to punch a hole into a file?
Date: Thu, 23 Nov 2023 23:36:58 +0100 [thread overview]
Message-ID: <CALXu0Uee2CHeCpthOKFmct+6HnEsKHbSzdK3Jyx8GsnYyt7Lbw@mail.gmail.com> (raw)
Linux has fallocate(fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, ...)
to punch a hole into a file, i.e. deallocate the blocks given and make
the file a "sparse file".
But how can I do that with the Cygwin API? Does anyone have an example
for Cygwin, which is the Win equivalent to Linux fallocate(fd,
FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, 1048576, 2097152);?
I tried with Cygwin 3.5, but the file was not sparse after that.
Ced
--
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur
next reply other threads:[~2023-11-23 22:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 22:36 Cedric Blancher [this message]
2023-11-24 11:01 ` Corinna Vinschen
2023-11-28 10:29 ` Corinna Vinschen
2023-12-01 10:22 ` Cedric Blancher
2023-12-01 11:02 ` Corinna Vinschen
2023-12-04 16:07 ` Andrey Repin
2023-12-05 6:36 ` Thomas Wolff
2023-12-05 13:53 ` Corinna Vinschen
2023-12-05 14:40 ` Thomas Wolff
2023-12-05 14:47 ` Thomas Wolff
2023-12-05 15:15 ` Corinna Vinschen
2023-12-01 10:44 ` _PC_MIN_HOLE_SIZE pathconf() " Cedric Blancher
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=CALXu0Uee2CHeCpthOKFmct+6HnEsKHbSzdK3Jyx8GsnYyt7Lbw@mail.gmail.com \
--to=cedric.blancher@gmail.com \
--cc=cygwin@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).