From 7e3335f010d3a985db2dd8c7d565f14f600d7f7e Mon Sep 17 00:00:00 2001 From: grog 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;