Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe handle possible errors from bdev_strategy.
details: https://anonhg.NetBSD.org/src/rev/ffb76b9c127c
branches: trunk
changeset: 342696:ffb76b9c127c
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Tue Jan 05 17:03:53 2016 +0000
description:
handle possible errors from bdev_strategy.
diffstat:
sys/dev/raidframe/rf_netbsdkintf.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (40 lines):
diff -r 4201d861f51c -r ffb76b9c127c sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Tue Jan 05 14:21:43 2016 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Tue Jan 05 17:03:53 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.337 2016/01/04 13:15:17 mlelstv Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.338 2016/01/05 17:03:53 mlelstv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.337 2016/01/04 13:15:17 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.338 2016/01/05 17:03:53 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -2323,7 +2323,9 @@
bp->b_resid = dsize;
bdev_strategy(bp);
- error = biowait(bp);
+ error = bp->b_error;
+ if (!error)
+ error = biowait(bp);
if (!error) {
memcpy(data, bp->b_data, msize);
@@ -2368,7 +2370,9 @@
bdev_strategy(bp);
if (asyncp)
return 0;
- error = biowait(bp);
+ error = bp->b_error;
+ if (!error)
+ error = biowait(bp);
brelse(bp, 0);
if (error) {
#if 1
Home |
Main Index |
Thread Index |
Old Index