Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Feb 2000 18:28:55 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Ian Dowse <iedowse@maths.tcd.ie>
Cc:        freebsd-current@freebsd.org
Subject:   Re: ffs_blkfree: freeing free block (was Re: Panic (pmap)) 
Message-ID:  <200002240228.SAA33327@apollo.backplane.com>
References:   <200002240148.aa34053@salmon.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help

:
: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




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