From owner-svn-src-head@FreeBSD.ORG Sun Oct 28 18:53:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5089C9E; Sun, 28 Oct 2012 18:53:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBFF78FC08; Sun, 28 Oct 2012 18:53:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SIrSN5076698; Sun, 28 Oct 2012 18:53:28 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SIrSYs076693; Sun, 28 Oct 2012 18:53:28 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201210281853.q9SIrSYs076693@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 28 Oct 2012 18:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242259 - in head/sys: sys ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 28 Oct 2012 18:53:28 -0000 Author: trasz Date: Sun Oct 28 18:53:28 2012 New Revision: 242259 URL: http://svn.freebsd.org/changeset/base/242259 Log: Fix two problems that caused instant panic when the device mounted with softupdates went away. Note that this does not fix the problem entirely; I'm committing it now to make it easier for someone to pick up the work. Reviewed by: mckusick Modified: head/sys/sys/buf.h head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Sun Oct 28 18:46:06 2012 (r242258) +++ head/sys/sys/buf.h Sun Oct 28 18:53:28 2012 (r242259) @@ -427,7 +427,6 @@ buf_deallocate(struct buf *bp) { if (bioops.io_deallocate) (*bioops.io_deallocate)(bp); - BUF_LOCKFREE(bp); } static __inline int Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Sun Oct 28 18:46:06 2012 (r242258) +++ head/sys/ufs/ffs/ffs_softdep.c Sun Oct 28 18:53:28 2012 (r242259) @@ -13342,8 +13342,13 @@ softdep_deallocate_dependencies(bp) if ((bp->b_ioflags & BIO_ERROR) == 0) panic("softdep_deallocate_dependencies: dangling deps"); - softdep_error(bp->b_vp->v_mount->mnt_stat.f_mntonname, bp->b_error); - panic("softdep_deallocate_dependencies: unrecovered I/O error"); + if (bp->b_vp != NULL && bp->b_vp->v_mount != NULL) + softdep_error(bp->b_vp->v_mount->mnt_stat.f_mntonname, bp->b_error); + else + printf("softdep_deallocate_dependencies: " + "got error %d while accessing filesystem\n", bp->b_error); + if (bp->b_error != ENXIO) + panic("softdep_deallocate_dependencies: unrecovered I/O error"); } /*