From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id B6EDC3858C62; Fri, 25 Aug 2023 11:23:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6EDC3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1692962616; bh=xqZhPrYlCVR8Fr05KVc1T9vX2fLFm0kX9TUpMHlm9Oo=; h=Date:From:To:Subject:Reply-To:References:In-Reply-To:From; b=ZsV8yyI07QdDlHeSURiumdAiOhs4ET2hrf+wTvsYj196N+d7dVHgcD9o7TWSM9f9f ILCYQhn7GNXsGBFcnZc1QJRNNcpHCxEUAAqOcL5vM0/OiXlhJesO7+wTfHbfrjyPLs WE4bQNId9XQwlv2z8Sr4y6hWzC08hMQ6W143huiQ= Received: by calimero.vinschen.de (Postfix, from userid 500) id D2446A80C9A; Fri, 25 Aug 2023 13:23:34 +0200 (CEST) Date: Fri, 25 Aug 2023 13:23:34 +0200 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: SEEK_HOLE Support in Cygwin? Message-ID: Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: On Aug 25 13:09, Roland Mainz wrote: > On Fri, Aug 25, 2023 at 11:05 AM Corinna Vinschen > 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 < > 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, So you didn't actually run the test? > 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 ? If you found fallocate() in fhandler/disk_file.cc, I need new glasses. Corinna