From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id 90AF5385414E; Mon, 11 Jul 2022 11:50:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 90AF5385414E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Add FIOBMAP2 ioctl X-Act-Checkin: newlib-cygwin X-Git-Author: Alan Somers X-Git-Refname: refs/heads/master X-Git-Oldrev: c42aaaea4fd0effa2ad7871045eeb59eb53fa507 X-Git-Newrev: 8fe49db783fd0841296afaf0226f712bc5967f4b Message-Id: <20220711115018.90AF5385414E@sourceware.org> Date: Mon, 11 Jul 2022 11:50:18 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2022 11:50:18 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D8fe49db783f= d0841296afaf0226f712bc5967f4b commit 8fe49db783fd0841296afaf0226f712bc5967f4b Author: Alan Somers Date: Thu Jun 20 14:13:10 2019 +0000 Add FIOBMAP2 ioctl =20 This ioctl exposes VOP_BMAP information to userland. It can be used by programs like fragmentation analyzers and optimized cp implementations.= But I'm using it to test fusefs's VOP_BMAP implementation. The "2" in the n= ame distinguishes it from the similar but incompatible FIBMAP ioctls in Net= BSD and Linux. FIOBMAP2 differs from FIBMAP in that it uses a 64-bit block number instead of 32-bit, and it also returns runp and runb. =20 Reviewed by: mckusick MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20705 Diff: --- newlib/libc/sys/rtems/include/sys/filio.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/newlib/libc/sys/rtems/include/sys/filio.h b/newlib/libc/sys/rt= ems/include/sys/filio.h index 868fe53c2..1a3fc4293 100644 --- a/newlib/libc/sys/rtems/include/sys/filio.h +++ b/newlib/libc/sys/rtems/include/sys/filio.h @@ -62,6 +62,13 @@ struct fiodgname_arg { /* Handle lseek SEEK_DATA and SEEK_HOLE for holey file knowledge. */ #define FIOSEEKDATA _IOWR('f', 97, off_t) /* SEEK_DATA */ #define FIOSEEKHOLE _IOWR('f', 98, off_t) /* SEEK_HOLE */ +struct fiobmap2_arg { + int64_t bn; + int runp; + int runb; +}; +/* Get the file's bmap info for the logical block bn */ +#define FIOBMAP2 _IOWR('f', 99, struct fiobmap2_arg) =20 #ifdef _KERNEL #ifdef COMPAT_FREEBSD32