From owner-freebsd-bugs@FreeBSD.ORG Tue Jul 5 19:53:25 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4118516A430 for ; Tue, 5 Jul 2005 19:53:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 279C143EED for ; Tue, 5 Jul 2005 19:50:04 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j65Jo4RB013642 for ; Tue, 5 Jul 2005 19:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j65Jo4v1013641; Tue, 5 Jul 2005 19:50:04 GMT (envelope-from gnats) Date: Tue, 5 Jul 2005 19:50:04 GMT Message-Id: <200507051950.j65Jo4v1013641@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: John Baldwin Cc: Subject: Re: kern/80362: [PATCH] add preadv() and pwritev() system calls X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Baldwin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2005 19:53:25 -0000 The following reply was made to PR kern/80362; it has been noted by GNATS. From: John Baldwin To: bug-followup@FreeBSD.org, marcolz@stack.nl Cc: sobomax@FreeBSD.org Subject: Re: kern/80362: [PATCH] add preadv() and pwritev() system calls Date: Tue, 5 Jul 2005 15:09:42 -0400 I've looked at this patch and have integrated into a test tree in P4 and played with it some. The original patch didn't do any of the extra checks that pread() and pwrite() do compared to read() and write() in the preadv() and pwritev() functions (i.e. don't allow the operation on pipes and don't allow negative offsets on devices in /dev). It also exposed some implementation details in the kern_p{read,write}v() interface (FOF_OFFSET flag) that normally should be hidden from the ABIs. Instead, I merged much of the common code in dofile{read,write}() and the old kern_{read,write}v() such that read() and write() just construct a uio and call kern_readv() and kern_writev(), respectively. I then moved the extra p* checks into the kern_preadv() and kern_pwritev() functions and made pread() and pwritev() construct a simple uio and call the kern_foov() cousin as well. kern_foov() now no longer calls kern_pfoov() but instead, both are simpler wrappers around dofilefoo(). Also, the kern_pfoov() interface is simpler in that it just takes arguments normally passed to the associated syscall. I didn't change any of the docs for this, just the kernel side. The updated kernel patch is at http://www.FreeBSD.org/~jhb/patches/preadv.patch Marc, can you test it to make sure nothing was broken by all the reshuffling? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org