Date: Tue, 5 Jul 2005 19:50:04 GMT From: John Baldwin <jhb@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/80362: [PATCH] add preadv() and pwritev() system calls Message-ID: <200507051950.j65Jo4v1013641@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/80362; it has been noted by GNATS. From: John Baldwin <jhb@FreeBSD.org> 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 <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507051950.j65Jo4v1013641>