From owner-svn-src-all@freebsd.org Mon Nov 20 20:53:04 2017 Return-Path: Delivered-To: svn-src-all@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 D58E1DF52E1; Mon, 20 Nov 2017 20:53:04 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A22CC6CA44; Mon, 20 Nov 2017 20:53:04 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAKKr3OH063463; Mon, 20 Nov 2017 20:53:03 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAKKr3Gk063462; Mon, 20 Nov 2017 20:53:03 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201711202053.vAKKr3Gk063462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 20 Nov 2017 20:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326029 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 326029 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2017 20:53:04 -0000 Author: scottl Date: Mon Nov 20 20:53:03 2017 New Revision: 326029 URL: https://svnweb.freebsd.org/changeset/base/326029 Log: Update a comment in brelse() to match reality. Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Mon Nov 20 20:05:30 2017 (r326028) +++ head/sys/kern/vfs_bio.c Mon Nov 20 20:53:03 2017 (r326029) @@ -2340,9 +2340,18 @@ brelse(struct buf *bp) !(bp->b_flags & B_INVAL)) { /* * Failed write, redirty. All errors except ENXIO (which - * means the device is gone) are expected to be potentially - * transient - underlying media might work if tried again - * after EIO, and memory might be available after an ENOMEM. + * means the device is gone) are treated as being + * transient. + * + * XXX Treating EIO as transient is not correct; the + * contract with the local storage device drivers is that + * they will only return EIO once the I/O is no longer + * retriable. Network I/O also respects this through the + * guarantees of TCP and/or the internal retries of NFS. + * ENOMEM might be transient, but we also have no way of + * knowing when its ok to retry/reschedule. In general, + * this entire case should be made obsolete through better + * error handling/recovery and resource scheduling. * * Do this also for buffers that failed with ENXIO, but have * non-empty dependencies - the soft updates code might need