From owner-svn-src-head@freebsd.org Tue Feb 18 23:56:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3FA1249469; Tue, 18 Feb 2020 23:56:23 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Md6b6CwMz3N6S; Tue, 18 Feb 2020 23:56:23 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9DA027FDE; Tue, 18 Feb 2020 23:56:23 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01INuNlH062948; Tue, 18 Feb 2020 23:56:23 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01INuNZc062947; Tue, 18 Feb 2020 23:56:23 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202002182356.01INuNZc062947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 18 Feb 2020 23:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358085 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 358085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2020 23:56:24 -0000 Author: mckusick Date: Tue Feb 18 23:56:23 2020 New Revision: 358085 URL: https://svnweb.freebsd.org/changeset/base/358085 Log: Additional KASSERTs to ensure the consistency of the soft updates indirdep structure. No functional change. Tested by: Peter Holm (as part of a larger patch) Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Tue Feb 18 21:36:54 2020 (r358084) +++ head/sys/ufs/ffs/ffs_softdep.c Tue Feb 18 23:56:23 2020 (r358085) @@ -8224,8 +8224,13 @@ indir_trunc(freework, dbn, lbn) * If we're goingaway, free the indirdep. Otherwise it will * linger until the write completes. */ - if (goingaway) + if (goingaway) { + KASSERT(indirdep->ir_savebp == bp, + ("indir_trunc: losing ir_savebp %p", + indirdep->ir_savebp)); + indirdep->ir_savebp = NULL; free_indirdep(indirdep); + } } FREE_LOCK(ump); /* Initialize pointers depending on block size. */ @@ -10739,6 +10744,8 @@ free_indirdep(indirdep) ("free_indirdep: %p still on newblk list.", indirdep)); KASSERT(indirdep->ir_saveddata == NULL, ("free_indirdep: %p still has saved data.", indirdep)); + KASSERT(indirdep->ir_savebp == NULL, + ("free_indirdep: %p still has savebp buffer.", indirdep)); if (indirdep->ir_state & ONWORKLIST) WORKLIST_REMOVE(&indirdep->ir_list); WORKITEM_FREE(indirdep, D_INDIRDEP);