Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs - in lfs_bwrite_ext, if we're cleaner,
details: https://anonhg.NetBSD.org/src/rev/a63d13b8ace7
branches: trunk
changeset: 540455:a63d13b8ace7
user: yamt <yamt%NetBSD.org@localhost>
date: Sat Dec 14 13:41:25 2002 +0000
description:
- in lfs_bwrite_ext, if we're cleaner,
mark inode IN_CLEANING rather then IN_MODIFIED.
otherwise cleaned (indirect) blocks belongs to the inode isn't written
until next sync.
- add assertions.
diffstat:
sys/ufs/lfs/lfs_bio.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (39 lines):
diff -r 615170c4211c -r a63d13b8ace7 sys/ufs/lfs/lfs_bio.c
--- a/sys/ufs/lfs/lfs_bio.c Sat Dec 14 11:54:47 2002 +0000
+++ b/sys/ufs/lfs/lfs_bio.c Sat Dec 14 13:41:25 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_bio.c,v 1.47 2002/11/27 11:36:40 yamt Exp $ */
+/* $NetBSD: lfs_bio.c,v 1.48 2002/12/14 13:41:25 yamt Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.47 2002/11/27 11:36:40 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.48 2002/12/14 13:41:25 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -260,7 +260,10 @@
struct lfs *fs;
struct inode *ip;
int fsb, error, s;
-
+
+ KASSERT(bp->b_flags & B_BUSY);
+ KASSERT(flags & BW_CLEAN || !(bp->b_flags & B_CALL));
+
/*
* Don't write *any* blocks if we're mounted read-only.
* In particular the cleaner can't write blocks either.
@@ -300,7 +303,7 @@
}
ip = VTOI(bp->b_vp);
- if (bp->b_flags & B_CALL) {
+ if (flags & BW_CLEAN) {
LFS_SET_UINO(ip, IN_CLEANING);
} else {
LFS_SET_UINO(ip, IN_MODIFIED);
Home |
Main Index |
Thread Index |
Old Index