From owner-svn-src-head@freebsd.org Wed Mar 23 04:59:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A246CAB4471; Wed, 23 Mar 2016 04:59:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 82A851137; Wed, 23 Mar 2016 04:59:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 7B8691AC1; Wed, 23 Mar 2016 04:59:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 329F018B02; Wed, 23 Mar 2016 04:59:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id yXlpEt__4dEF; Wed, 23 Mar 2016 04:59:23 +0000 (UTC) Content-Type: text/plain; charset=us-ascii DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 855E118AFF Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r297201 - in head: share/man/man4 sys/dev/filemon From: Bryan Drewery X-Mailer: iPhone Mail (12H143) In-Reply-To: Date: Tue, 22 Mar 2016 21:59:05 -0700 Cc: Benjamin Kaduk , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1FEF661F-FDEC-4711-A381-4EAA4ACDBA1D@FreeBSD.org> References: <201603222241.u2MMf7ub090070@repo.freebsd.org> To: "cem@FreeBSD.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2016 04:59:30 -0000 > On Mar 22, 2016, at 20:18, Conrad Meyer wrote: >=20 >> On Tue, Mar 22, 2016 at 7:46 PM, Benjamin Kaduk wrote= : >>> On Tue, Mar 22, 2016 at 9:11 PM, Bryan Drewery wr= ote: >>>=20 >>> The manpage for close(2) does document some errors, one being ENOSPC. T= he >>> close(2) behavior of returning write(2), really VOP_WRITE(9), errors tho= ugh >>> is specific to filemon since all of the writes are hidden and this is th= e >>> only place to return an error. >>> ... >>=20 >> filemon is not unique in this regard; the AFS filesystem buffers writes >> locally and in some cases errors writing to the remote server can be dela= yed >> until close(). >=20 > Right. filemon is not the only case. Another example would be TCP > socket fds, e.g., when the connection is RST after write(2) queues > data on the outgoing sockbuf but before it is transmitted. >=20 I'm really not saying it's the only case. I'm saying close(2) returning a do= zen write(2) errors is not normal and is documented here because it is expec= ted here. Anyone could write a module or FS that returns some random error o= n close(2). That doesn't mean it should be documented directly in close(2). = Consider the next commit here also returns EFAULT and ENAMELEN, which defin= itely are special case. There are only 2 filemon consumers, script(1) and b= make. For bmake there is a patch in testing to utilize the close(2) error, s= ince it's currently ignored. For script(1) I need to fix it still. If there are errors that are common and missing from close(2), please do doc= ument them. As Benjamin referenced, most people never fathom that it can ev= en fail. I know that NFS errors are not widely documented too. Bryan=