From owner-svn-src-stable-7@FreeBSD.ORG Sun Mar 1 11:17:39 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35DF3106564A; Sun, 1 Mar 2009 11:17:39 +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 234D18FC0C; Sun, 1 Mar 2009 11:17:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n21BHdDs041898; Sun, 1 Mar 2009 11:17:39 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n21BHdnY041897; Sun, 1 Mar 2009 11:17:39 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200903011117.n21BHdnY041897@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 1 Mar 2009 11:17:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189228 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb fs/msdosfs X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2009 11:17:39 -0000 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];