From 416e7bfc5a6e4f73ffb52bd0875bc1d76b73ef9f Mon Sep 17 00:00:00 2001 From: dg Date: Fri, 22 Jan 1999 09:07:32 +0000 Subject: Gutted softdep_deallocate_dependencies and replaced it with a panic. It turns out to not be useful to unwind the dependencies and continue in the face of a fatal error. Also changed the log() to a printf() in softdep_error() so that it will be output in the case of a impending panic. Submitted by: Kirk McKusick --- contrib/sys/softupdates/ffs_softdep.c | 44 +++-------------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) (limited to 'contrib') diff --git a/contrib/sys/softupdates/ffs_softdep.c b/contrib/sys/softupdates/ffs_softdep.c index 433cafe..c82f929 100644 --- a/contrib/sys/softupdates/ffs_softdep.c +++ b/contrib/sys/softupdates/ffs_softdep.c @@ -54,7 +54,7 @@ * SUCH DAMAGE. * * from: @(#)ffs_softdep.c 9.28 (McKusick) 8/8/98 - * $Id: ffs_softdep.c,v 1.19 1999/01/06 18:18:04 bde Exp $ + * $Id: ffs_softdep.c,v 1.20 1999/01/07 16:14:10 bde Exp $ */ /* @@ -4178,43 +4178,8 @@ void softdep_deallocate_dependencies(bp) struct buf *bp; { - struct worklist *wk; - - if ((bp->b_flags & B_ERROR) == 0) - panic("softdep_deallocate_dependencies: dangling deps"); softdep_error(bp->b_vp->v_mount->mnt_stat.f_mntonname, bp->b_error); - ACQUIRE_LOCK(&lk); - while ((wk = LIST_FIRST(&bp->b_dep)) != NULL) { - WORKLIST_REMOVE(wk); - FREE_LOCK(&lk); - switch (wk->wk_type) { - /* - * XXX - should really clean up, but for now we will - * just leak memory and not worry about it. Also should - * mark the filesystem permanently dirty so that it will - * force fsck to be run (though this would best be done - * in the mainline code). - */ - case D_PAGEDEP: - case D_INODEDEP: - case D_BMSAFEMAP: - case D_ALLOCDIRECT: - case D_INDIRDEP: - case D_ALLOCINDIR: - case D_MKDIR: -#ifdef DEBUG - printf("Lost type %s\n", TYPENAME(wk->wk_type)); -#endif - break; - default: - panic("%s: Unexpected type %s", - "softdep_deallocate_dependencies", - TYPENAME(wk->wk_type)); - /* NOTREACHED */ - } - ACQUIRE_LOCK(&lk); - } - FREE_LOCK(&lk); + panic("softdep_deallocate_dependencies: dangling deps"); } /* @@ -4225,9 +4190,6 @@ softdep_error(func, error) char *func; int error; { - /* XXX should do something better! */ - log(LOG_ERR, "%s: got error %d while accessing filesystem\n", - func, error); + printf("%s: got error %d while accessing filesystem\n", func, error); } - -- cgit v1.1