diff options
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 426238be86f..c392a17a161 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.381 2017/06/06 19:01:27 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.382 2017/06/12 15:43:25 jsing Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -2569,11 +2569,14 @@ sr_bio_handler(struct sr_softc *sc, struct sr_discipline *sd, u_long cmd, sc->sc_status.bs_status = (rv ? BIO_STATUS_ERROR : BIO_STATUS_SUCCESS); + if (sc->sc_status.bs_msg_count > 0) + rv = 0; + memcpy(&bio->bio_status, &sc->sc_status, sizeof(struct bio_status)); rw_exit_write(&sc->sc_lock); - return (0); + return (rv); } int |