Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Mar 2009 11:17:39 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r189228 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb fs/msdosfs
Message-ID:  <200903011117.n21BHdnY041897@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903011117.n21BHdnY041897>