Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern in getblk(), don't call allocbuf() for B_LOCKED buf...
details: https://anonhg.NetBSD.org/src/rev/f895a3f2fa24
branches: trunk
changeset: 552388:f895a3f2fa24
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Sep 24 10:44:44 2003 +0000
description:
in getblk(), don't call allocbuf() for B_LOCKED buffers.
LFS misses total size of B_LOCKED buffer (locked_queue_bytes) when
getblk() re-size them.
XXX maybe needs a better fix.
diffstat:
sys/kern/vfs_bio.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 7dc09f181505 -r f895a3f2fa24 sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c Wed Sep 24 10:25:26 2003 +0000
+++ b/sys/kern/vfs_bio.c Wed Sep 24 10:44:44 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_bio.c,v 1.95 2003/09/07 11:59:40 yamt Exp $ */
+/* $NetBSD: vfs_bio.c,v 1.96 2003/09/24 10:44:44 yamt Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -80,7 +80,7 @@
#include "opt_softdep.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.95 2003/09/07 11:59:40 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.96 2003/09/24 10:44:44 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -724,7 +724,15 @@
simple_unlock(&bp->b_interlock);
simple_unlock(&bqueue_slock);
splx(s);
- allocbuf(bp, size);
+ /*
+ * LFS can't track total size of B_LOCKED buffer (locked_queue_bytes)
+ * if we re-size buffers here.
+ */
+ if (ISSET(bp->b_flags, B_LOCKED)) {
+ KASSERT(bp->b_bufsize >= size);
+ } else {
+ allocbuf(bp, size);
+ }
return (bp);
}
Home |
Main Index |
Thread Index |
Old Index