From owner-cvs-src-old@FreeBSD.ORG Sun Mar 1 10:51:40 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 308761065674 for ; Sun, 1 Mar 2009 10:51:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1DCC48FC15 for ; Sun, 1 Mar 2009 10:51:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n21ApeQR070140 for ; Sun, 1 Mar 2009 10:51:40 GMT (envelope-from trasz@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n21Apd5x070139 for cvs-src-old@freebsd.org; Sun, 1 Mar 2009 10:51:39 GMT (envelope-from trasz@repoman.freebsd.org) Message-Id: <200903011051.n21Apd5x070139@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to trasz@repoman.freebsd.org using -f From: Edward Tomasz Napierala Date: Sun, 1 Mar 2009 10:51:34 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 Subject: cvs commit: src/sys/kern vfs_bio.c vfs_mount.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2009 10:51:42 -0000 trasz 2009-03-01 10:51:34 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/kern vfs_bio.c vfs_mount.c Log: SVN rev 189224 on 2009-03-01 10:51:34Z by trasz MFC r174937 by imp. Reviewed by: imp Approved by: rwatson (mentor) Original commit log: A partial solution to some of the 'pull the umass device with a mounted FS' problems. These are more along the lines of 'avoiding an avoidable panic' than a complete solution to removable devices. We now close the barn door after the horse has gotten lose and has been hit by a truck, as it were. The barn no longer catches fire in this case, but the horse is still dead :-). The vfs_bio.c fix causes us not to put a failed write back into the dirty pool if the error returned was ENXIO. In that case, the buffer is treated like any other clean buffer that's being retured. ENXIO means the device isn't there anymore and will never be there again in the future, so retrying is futile. The vfs_mount.c fix treats 'ENXIO' as success for unmounting a file system. If the device is gone, retrying later won't help and we'll never be able to unmount the device. These two are part of a larger patch set submitted by the author. The other patches will be forth coming. I added comments to these two patches. Submitted by: Henrik Gulbrandsen Reviewed by: phk@ PR: usb/46176 (partial) Revision Changes Path 1.528.2.4 +4 -0 src/sys/kern/vfs_bio.c 1.265.2.13 +7 -2 src/sys/kern/vfs_mount.c