From owner-cvs-src@FreeBSD.ORG Mon Jun 13 00:16:26 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13E9B16A41C; Mon, 13 Jun 2005 00:16:26 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B73E643D1D; Mon, 13 Jun 2005 00:16:25 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j5D0GOgm008038; Sun, 12 Jun 2005 20:16:24 -0400 (EDT) Date: Sun, 12 Jun 2005 20:16:24 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Brian Fundakowski Feldman In-Reply-To: <20050612122516.GG66188@green.homeunix.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: cvs-src@freebsd.org, Alfred Perlstein , 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 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2005 00:16:26 -0000 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