Don't ever partially write dirops, even if we need the cleaner to run.
This increases the chances of the "no clean segments" panic slightly, but allows us to run the ckckp regression test successfully to completion.
This commit is contained in:
parent
635007e1aa
commit
8696fd25e2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lfs_extern.h,v 1.80 2006/04/30 21:19:42 perseant Exp $ */
|
||||
/* $NetBSD: lfs_extern.h,v 1.81 2006/05/01 19:47:29 perseant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
|
||||
@ -240,6 +240,7 @@ int lfs_gop_alloc(struct vnode *, off_t, off_t, int, struct ucred *);
|
||||
void lfs_gop_size(struct vnode *, off_t, off_t *, int);
|
||||
int lfs_putpages_ext(void *, int);
|
||||
int lfs_gatherpages(struct vnode *);
|
||||
void lfs_flush_dirops(struct lfs *);
|
||||
void lfs_flush_pchain(struct lfs *);
|
||||
|
||||
int lfs_bwrite (void *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lfs_segment.c,v 1.176 2006/04/30 21:19:42 perseant Exp $ */
|
||||
/* $NetBSD: lfs_segment.c,v 1.177 2006/05/01 19:47:29 perseant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
|
||||
@ -67,7 +67,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.176 2006/04/30 21:19:42 perseant Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.177 2006/05/01 19:47:29 perseant Exp $");
|
||||
|
||||
#ifdef DEBUG
|
||||
# define vndebug(vp, str) do { \
|
||||
@ -627,6 +627,8 @@ lfs_segwrite(struct mount *mp, int flags)
|
||||
error = lfs_writevnodes(fs, mp, sp, VN_DIROP);
|
||||
if (um_error == 0)
|
||||
um_error = error;
|
||||
/* In case writevnodes errored out */
|
||||
lfs_flush_dirops(fs);
|
||||
((SEGSUM *)(sp->segsum))->ss_flags &= ~(SS_CONT);
|
||||
lfs_finalize_fs_seguse(fs);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lfs_vnops.c,v 1.170 2006/04/30 21:19:42 perseant Exp $ */
|
||||
/* $NetBSD: lfs_vnops.c,v 1.171 2006/05/01 19:47:29 perseant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
|
||||
@ -67,7 +67,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.170 2006/04/30 21:19:42 perseant Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.171 2006/05/01 19:47:29 perseant Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -1133,7 +1133,7 @@ lfs_strategy(void *v)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
lfs_flush_dirops(struct lfs *fs)
|
||||
{
|
||||
struct inode *ip, *nip;
|
||||
@ -1143,6 +1143,7 @@ lfs_flush_dirops(struct lfs *fs)
|
||||
int needunlock;
|
||||
|
||||
ASSERT_MAYBE_SEGLOCK(fs);
|
||||
KASSERT(fs->lfs_nadirop == 0);
|
||||
|
||||
if (fs->lfs_ronly)
|
||||
return;
|
||||
@ -1185,6 +1186,8 @@ lfs_flush_dirops(struct lfs *fs)
|
||||
simple_unlock(&fs->lfs_interlock);
|
||||
vp = ITOV(ip);
|
||||
|
||||
KASSERT((ip->i_flag & IN_ADIROP) == 0);
|
||||
|
||||
/*
|
||||
* All writes to directories come from dirops; all
|
||||
* writes to files' direct blocks go through the page
|
||||
|
Loading…
Reference in New Issue
Block a user