svn commit: r242259 - in head/sys: sys ufs/ffs

Edward Tomasz Napierala trasz at FreeBSD.org
Sun Oct 28 18:53:28 UTC 2012


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");
 }
 
 /*


More information about the svn-src-all mailing list