cvs commit: src/sys/nfsclient nfs_bio.c nfs_vfsops.c nfsargs.h nfsmount.h src/sys/sys buf.h bufobj.h src/sys/kern vfs_bio.c

Daniel Eischen deischen at freebsd.org
Mon Jun 13 00:16:26 GMT 2005


On Sun, 12 Jun 2005, Brian Fundakowski Feldman wrote:

> On Sun, Jun 12, 2005 at 06:30:49AM -0400, Daniel Eischen wrote:
> > I think I agree with Alfred.
> >
> > If select() returns ready, then you should be able to write
> > some part of your buffer.  Also, anyone using a file descriptor
> > in non-blocking mode should expect short writes and loop until
> > the entire buffer has been written.
> >
> > >From my understanding, disk I/O has always returned ready, then
> > blocked in the kernel if necessary.  I think that if we are going
> > to start honoring non-blocking mode for disk I/O (or NFS, whatever),
> > it should be done fully.  That means you allow short writes when
> > select() returns ready, and select() doesn't return ready if no
> > data can be written.
>
>  That's a good point.  I wasn't more than vaguely aware of libc_r's
> continued existance and usage of such things.  Fixing select(3) to
> match up would be easiest, right?  Short writes are definitely not
> allowed for a non-socket, though.

Forgive my ignorance, but why are short writes for non-sockets not
allowed?  If you are using non-blocking IO, shouldn't you allow
for this to happen?

-- 
DE



More information about the cvs-all mailing list