From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 22F983858C41; Mon, 15 Jan 2024 10:05:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22F983858C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705313121; bh=vTlHXNHyJBNCqUbSF38HvbLdUwNe6qlv2GkVAvlz/3Y=; h=From:To:Subject:Date:From; b=acCh9n9Op6jNAKFxNZY5qb7cVph/WLcjh1XO5xZONvYM3flzwL+1C5wRDSh73+vm5 s1gFyeBo1hUBUAY0ktMPmCaxcL1MafPPWfeXYGX3KZ3ilCA4QkxiAA42CI1JkoX/ha GyOZjDi+g3YjNwFmpwQKYumQ8kDlBekFf5xGS4y0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: api docs: add missing fallocate X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: 241b50a7abe25fc017f36eeb8704199f48d0b404 X-Git-Newrev: 4ecfb5b7292af4baf0a2f199f5351b67c8faf4cc Message-Id: <20240115100521.22F983858C41@sourceware.org> Date: Mon, 15 Jan 2024 10:05:20 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D4ecfb5b7292= af4baf0a2f199f5351b67c8faf4cc commit 4ecfb5b7292af4baf0a2f199f5351b67c8faf4cc Author: Corinna Vinschen AuthorDate: Mon Jan 15 11:03:48 2024 +0100 Commit: Corinna Vinschen CommitDate: Mon Jan 15 11:04:29 2024 +0100 Cygwin: api docs: add missing fallocate =20 Also add notes in terms of fallocate quirks. =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/doc/posix.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/winsup/doc/posix.xml b/winsup/doc/posix.xml index 151aeb9fee2b..1a4eee1ab1b8 100644 --- a/winsup/doc/posix.xml +++ b/winsup/doc/posix.xml @@ -1314,6 +1314,7 @@ also IEEE Std 1003.1-2017 (POSIX.1-2017). exp10 exp10f exp10l + fallocate (see chapter "Implementation N= otes") fcloseall fcloseall_r fedisableexcept @@ -1755,6 +1756,14 @@ RLIMIT_CORE and RLIMIT_STACK return the current valu= es and set the requested values. All other resource arguments return -1 and set EINVAL. =20 +fallocate has a few Windows quirks: The +FALLOC_FL_ZERO_RANGE operation is NOT atomic. With flags set to 0 and +FALLOC_FL_KEEP_SIZE, sparse blocks in the given range are re-allocated +as per the POSIX requirements. This re-allocation operation isn't +atomic either. Over-allocation with FALLOC_FL_KEEP_SIZE is only +temporary on Windows until the last handle to the file is closed. +Over-allocation on sparse files is entirely ignored on Windows. + =20