Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jun 2005 20:16:24 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Brian Fundakowski Feldman <green@freebsd.org>
Cc:        cvs-src@freebsd.org, Alfred Perlstein <alfred@freebsd.org>, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: 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
Message-ID:  <Pine.GSO.4.43.0506122013310.20819-100000@sea.ntplx.net>
In-Reply-To: <20050612122516.GG66188@green.homeunix.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0506122013310.20819-100000>