Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm examine the B_ERROR flag instead of the b_error fiel...
details: https://anonhg.NetBSD.org/src/rev/9244bd58dfab
branches: trunk
changeset: 538721:9244bd58dfab
user: chs <chs%NetBSD.org@localhost>
date: Sun Oct 27 16:53:20 2002 +0000
description:
examine the B_ERROR flag instead of the b_error field to determine
whether or not an error has occured. pointed out by Stephan Uphoff.
diffstat:
sys/uvm/uvm_swap.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (44 lines):
diff -r b3441f4f1802 -r 9244bd58dfab sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c Sun Oct 27 14:42:58 2002 +0000
+++ b/sys/uvm/uvm_swap.c Sun Oct 27 16:53:20 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_swap.c,v 1.71 2002/10/23 09:15:10 jdolecek Exp $ */
+/* $NetBSD: uvm_swap.c,v 1.72 2002/10/27 16:53:20 chs Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Matthew R. Green
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.71 2002/10/23 09:15:10 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.72 2002/10/27 16:53:20 chs Exp $");
#include "fs_nfs.h"
#include "opt_uvmhist.h"
@@ -1384,7 +1384,7 @@
struct vndxfer *vnx = vbp->vb_xfer;
struct buf *pbp = vnx->vx_bp; /* parent buffer */
struct swapdev *sdp = vnx->vx_sdp;
- int s, resid;
+ int s, resid, error;
UVMHIST_FUNC("sw_reg_iodone"); UVMHIST_CALLED(pdhist);
UVMHIST_LOG(pdhist, " vbp=%p vp=%p blkno=%x addr=%p",
@@ -1401,12 +1401,11 @@
pbp->b_resid -= resid;
vnx->vx_pending--;
- if (vbp->vb_buf.b_error) {
- UVMHIST_LOG(pdhist, " got error=%d !",
- vbp->vb_buf.b_error, 0, 0, 0);
-
+ if (vbp->vb_buf.b_flags & B_ERROR) {
/* pass error upward */
- vnx->vx_error = vbp->vb_buf.b_error;
+ error = vbp->vb_buf.b_error ? vbp->vb_buf.b_error : EIO;
+ UVMHIST_LOG(pdhist, " got error=%d !", error, 0, 0, 0);
+ vnx->vx_error = error;
}
/*
Home |
Main Index |
Thread Index |
Old Index