Module Name: src
Committed By: mlelstv
Date: Tue Jan 5 17:03:53 UTC 2016
Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c
Log Message:
handle possible errors from bdev_strategy.
To generate a diff of this commit:
cvs rdiff -u -r1.337 -r1.338 src/sys/dev/raidframe/rf_netbsdkintf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.337 src/sys/dev/raidframe/rf_netbsdkintf.c:1.338
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.337 Mon Jan 4 13:15:17 2016
+++ src/sys/dev/raidframe/rf_netbsdkintf.c Tue Jan 5 17:03:53 2016
@@ -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 @@ raidread_component_area(dev_t dev, struc
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 @@ raidwrite_component_area(dev_t dev, stru
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