SEEK_HOLE Support in Cygwin?

Roland Mainz roland.mainz@nrubsig.org
Fri Aug 25 11:09:09 GMT 2023


On Fri, Aug 25, 2023 at 11:05 AM Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
>
> On Aug 24 14:03, Roland Mainz wrote:
> > Question for Corinna:
>
> Everybody involved in the project could answer this question, but...
>
> > Does Cygwin support allocation/deallocation of filesystem blocks via
> > Linux's |fallocate()|-API ?
>
> ...just try this:
>
> $ cat > a.c <<EOF
> extern void fallocate();
> extern void posix_fallocate();
>
> int main()
> {
>   fallocate();
>   posix_fallocate();
> }
> EOF
> $ gcc -o a a.c

Thanks...
... I saw that the functions are there, but my question was more like
"supports"=="calls native Windows API".

|fallocate()| support seems to be in
./newlib-cygwin/winsup/cygwin/fhandler/disk_file.cc, and supports the
allocation of blocks - but I couldn't find support for
|FALLOC_FL_PUNCH_HOLE|, e.g. deallocation of blocks (to "punch" a hole
into the file).
Is this an oversight, or does Window's native API not support that ?

> In fact, we have a list of supported APIs: https://cygwin.com/cygwin-api/

Thanks

----

Bye,
Roland
--
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)


More information about the Cygwin-developers mailing list