svn commit: r189228 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb fs/msdosfs

Edward Tomasz Napierala trasz at FreeBSD.org
Sun Mar 1 03:17:39 PST 2009


Author: trasz
Date: Sun Mar  1 11:17:38 2009
New Revision: 189228
URL: http://svn.freebsd.org/changeset/base/189228

Log:
  MFC r187199:
  
  Turn a "panic: non-decreasing id" into an error printf.  This seems
  to be caused by a metadata corruption that occurs quite often after
  unplugging a pendrive during write activity.
  
  Reviewed by:	scottl
  Approved by:	rwatson (mentor)
  Sponsored by:	FreeBSD Foundation

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/fs/msdosfs/msdosfs_conv.c

Modified: stable/7/sys/fs/msdosfs/msdosfs_conv.c
==============================================================================
--- stable/7/sys/fs/msdosfs/msdosfs_conv.c	Sun Mar  1 11:11:14 2009	(r189227)
+++ stable/7/sys/fs/msdosfs/msdosfs_conv.c	Sun Mar  1 11:17:38 2009	(r189228)
@@ -1060,8 +1060,11 @@ mbnambuf_write(struct mbnambuf *nbp, cha
 	char *slot;
 	size_t count, newlen;
 
-	KASSERT(nbp->nb_len == 0 || id == nbp->nb_last_id - 1,
-	    ("non-decreasing id: id %d, last id %d", id, nbp->nb_last_id));
+	if (nbp->nb_len != 0 && id != nbp->nb_last_id - 1) {
+		printf("msdosfs: non-decreasing id: id %d, last id %d\n",
+		    id, nbp->nb_last_id);
+		return;
+	}
 
 	/* Will store this substring in a WIN_CHARS-aligned slot. */
 	slot = &nbp->nb_buf[id * WIN_CHARS];


More information about the svn-src-all mailing list