DragonFly BSD
DragonFly kernel List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: UIO_NOCOPY in smbfs

From: Jonas Trollvik <jontro@xxxxxxxxx>
Date: Fri, 25 Mar 2005 15:21:24 +0100

I see,
Still EOPNOTSUPP isnt even mentioned as an error associated with
sendfile in the man page.
Wouldnt it be good if sendfile would work on file systems not
supporting this operation by doing reading and writing the regular way
(if EOPNOTSUPP is returned), bypassing the "zero copying" feature.
That wouldnt be too hard to implement and not result in unexpected
behaviour when using programs like apache and ncftpd on certain file


On Thu, 24 Mar 2005 23:31:40 -0800 (PST), Matthew Dillon
<dillon@xxxxxxxxxxxxxxxxxxxx> wrote:
> :How hard would it be to add the UIO_NOCOPY functionality in smbfs?
> :
> :This is required for sendfile(2) to work
> :
> :in  /usr/src/sys/vfs/smbfs/smbfs_io.c on line 183 this exists:
> :        /*
> :         * Protect against method which is not supported for now
> :         */
> :        if (uiop->uio_segflg == UIO_NOCOPY)
> :                return EOPNOTSUPP;
> :EOPNOTSUPP is also the error that sendfile returns.
> :
> :If it's not too hard, I might give it a try as a newbeginner kernel
> :hacker, given the right directions...
> :I've seen this error reported on various places since this problem
> :aslo exists in freebsd
> :
> :Regards
> :Jonas Trollvik
>    I wouldn't call it a beginner programming task... the UIO_NOCOPY
>    is related to VM backed buffer cache pages.  It basically tells smbfs
>    to load the data into the buffer cache and the backing pages will
>    just 'happen' to be the same as the ones backing the UIO, so no extra
>    copy is required.
>                                        -Matt
>                                        Matthew Dillon
>                                        <dillon@xxxxxxxxxxxxx>

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]