From b6c7afd32c5d48d109a858c6a6061fc352e2aeb9 Mon Sep 17 00:00:00 2001 From: Greg Lehey Date: Sun, 12 Mar 2000 05:05:41 +0000 Subject: [PATCH] sdio: If sd I/O fails because of an I/O error, set the sd state correctly. Reported-by: phk Approved-by: jkh --- sys/dev/vinum/vinumrequest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c index 469d9cae34f4..da7bff441580 100644 --- a/sys/dev/vinum/vinumrequest.c +++ b/sys/dev/vinum/vinumrequest.c @@ -891,10 +891,10 @@ sdio(struct buf *bp) if (drive->state != drive_up) { if (sd->state >= sd_crashed) { - if (bp->b_flags & B_WRITE) /* writing, */ - set_sd_state(sd->sdno, sd_stale, setstate_force); - else + if (bp->b_flags & B_READ) /* reading, */ set_sd_state(sd->sdno, sd_crashed, setstate_force); + else + set_sd_state(sd->sdno, sd_stale, setstate_force); } bp->b_flags |= B_ERROR; bp->b_error = EIO;