From owner-freebsd-current Wed Feb 23 18:29: 2 2000 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 90D0A37BA6C for ; Wed, 23 Feb 2000 18:28:59 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id SAA33327; Wed, 23 Feb 2000 18:28:55 -0800 (PST) (envelope-from dillon) Date: Wed, 23 Feb 2000 18:28:55 -0800 (PST) From: Matthew Dillon Message-Id: <200002240228.SAA33327@apollo.backplane.com> To: Ian Dowse Cc: freebsd-current@freebsd.org Subject: Re: ffs_blkfree: freeing free block (was Re: Panic (pmap)) References: <200002240148.aa34053@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : :In message <200002232235.aa22335@salmon.maths.tcd.ie>, Ian Dowse writes: :> :>The fix should be relatively straightforward - either the code should :>avoid linking new indirection blocks until all allocations succeed, :>or it should back out the changes on failure. : :Here's one patch that seems to fix the problem. It may not be the best :approach though? : :Ian I thought of this but I was worried that the softupdates blackmagic would get broken by it, so my approach is to actually unwind it which, between inbetween to FSYNC's, should be softupdates-safe. -Matt : bap[indirs[i - 1].in_off] = nb; :+ if (allocib == NULL) { :+ /* :+ * Writing bp would link in the newly allocated :+ * blocks; hold off in case of allocation failure :+ * later. :+ */ :+ allocib = &bap[indirs[i - 1].in_off]; :+ allocbp = bp; :+ continue; :+ } :... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message