diff options
author | mav <mav@FreeBSD.org> | 2012-10-29 21:08:06 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-10-29 21:08:06 +0000 |
commit | d77bd5cf53f64f6067318e90b23004dae55a373b (patch) | |
tree | d76fc24d58da953e909072ccda09207519957a42 | |
parent | 139b791e20936463e049e70081975aa96cb6578e (diff) | |
download | FreeBSD-src-d77bd5cf53f64f6067318e90b23004dae55a373b.zip FreeBSD-src-d77bd5cf53f64f6067318e90b23004dae55a373b.tar.gz |
Minor addition to r242323:
Alike to BIO_WRITE, report success if at least one subdisk succeeded with
BIO_DELETE. But unlike BIO_WRITE don't fail disk on BIO_DELETE error.
Sponsored by: iXsystems, Inc.
MFC after: 1 month
-rw-r--r-- | sys/geom/raid/tr_raid1.c | 4 | ||||
-rw-r--r-- | sys/geom/raid/tr_raid1e.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/geom/raid/tr_raid1.c b/sys/geom/raid/tr_raid1.c index ff5e5cd..4465e32 100644 --- a/sys/geom/raid/tr_raid1.c +++ b/sys/geom/raid/tr_raid1.c @@ -891,10 +891,10 @@ rebuild_round_done: g_raid_unlock_range(sd->sd_volume, bp->bio_offset, bp->bio_length); } - if (pbp->bio_cmd == BIO_WRITE) { + if (pbp->bio_cmd != BIO_READ) { if (pbp->bio_inbed == 1 || pbp->bio_error != 0) pbp->bio_error = bp->bio_error; - if (bp->bio_error != 0) { + if (pbp->bio_cmd == BIO_WRITE && bp->bio_error != 0) { G_RAID_LOGREQ(0, bp, "Write failed: failing subdisk."); g_raid_tr_raid1_fail_disk(sd->sd_softc, sd, sd->sd_disk); } diff --git a/sys/geom/raid/tr_raid1e.c b/sys/geom/raid/tr_raid1e.c index d14a1e7..e28f984 100644 --- a/sys/geom/raid/tr_raid1e.c +++ b/sys/geom/raid/tr_raid1e.c @@ -1118,10 +1118,10 @@ rebuild_round_done: G_RAID_LOGREQ(2, bp, "REMAP done %d.", bp->bio_error); g_raid_unlock_range(sd->sd_volume, virtual, bp->bio_length); } - if (pbp->bio_cmd == BIO_WRITE) { + if (pbp->bio_cmd != BIO_READ) { if (pbp->bio_inbed == 1 || pbp->bio_error != 0) pbp->bio_error = bp->bio_error; - if (bp->bio_error != 0) { + if (pbp->bio_cmd == BIO_WRITE && bp->bio_error != 0) { G_RAID_LOGREQ(0, bp, "Write failed: failing subdisk."); g_raid_tr_raid1e_fail_disk(sd->sd_softc, sd, sd->sd_disk); } |