Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Ensure that b_bufsize is set to a range covering the...
details: https://anonhg.NetBSD.org/src/rev/88b9ecadb639
branches: trunk
changeset: 526339:88b9ecadb639
user: briggs <briggs%NetBSD.org@localhost>
date: Thu May 02 16:25:23 2002 +0000
description:
Ensure that b_bufsize is set to a range covering the buffer in vndstrategy().
This addresses kern/16570 where using the raw vnd device with a file backed by
NFS was failing due to bp->b_bufsize being 0.
diffstat:
sys/dev/vnd.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 8eda8c50ebfa -r 88b9ecadb639 sys/dev/vnd.c
--- a/sys/dev/vnd.c Thu May 02 16:24:24 2002 +0000
+++ b/sys/dev/vnd.c Thu May 02 16:25:23 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.78 2002/03/08 20:48:37 thorpej Exp $ */
+/* $NetBSD: vnd.c,v 1.79 2002/05/02 16:25:23 briggs Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.78 2002/03/08 20:48:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.79 2002/05/02 16:25:23 briggs Exp $");
#if defined(_KERNEL_OPT)
#include "fs_nfs.h"
@@ -455,7 +455,8 @@
splx(s);
nbp->vb_buf.b_flags = flags;
nbp->vb_buf.b_bcount = sz;
- nbp->vb_buf.b_bufsize = bp->b_bufsize;
+ nbp->vb_buf.b_bufsize = round_page((ulong)addr + sz)
+ - trunc_page((ulong) addr);
nbp->vb_buf.b_error = 0;
nbp->vb_buf.b_data = addr;
nbp->vb_buf.b_blkno = nbp->vb_buf.b_rawblkno = nbn + btodb(off);
Home |
Main Index |
Thread Index |
Old Index