Date: Sun, 28 Oct 2012 18:53:28 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> 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 Message-ID: <201210281853.q9SIrSYs076693@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210281853.q9SIrSYs076693>