diff options
author | mav <mav@FreeBSD.org> | 2012-10-29 18:04:38 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-10-29 18:04:38 +0000 |
commit | a43d540d9efdfd22157e434662f6be55d1437f32 (patch) | |
tree | 3057436f0446cd34f89a0161970b65aabfad7947 /sys/geom/raid/tr_raid1.c | |
parent | 76f8fadfa80a4732a2670b0032c3ac3fc89da8c7 (diff) | |
download | FreeBSD-src-a43d540d9efdfd22157e434662f6be55d1437f32.zip FreeBSD-src-a43d540d9efdfd22157e434662f6be55d1437f32.tar.gz |
Add basic BIO_DELETE support to GEOM RAID class for all RAID levels.
If at least one subdisk in the volume supports it, BIO_DELETE requests
will be propagated down. Unfortunatelly, for RAID levels with redundancy
unmapped blocks will be mapped back during first rebuild/resync process.
Sponsored by: iXsystems, Inc.
MFC after: 1 month
Diffstat (limited to 'sys/geom/raid/tr_raid1.c')
-rw-r--r-- | sys/geom/raid/tr_raid1.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/geom/raid/tr_raid1.c b/sys/geom/raid/tr_raid1.c index d8bc236..ff5e5cd 100644 --- a/sys/geom/raid/tr_raid1.c +++ b/sys/geom/raid/tr_raid1.c @@ -647,10 +647,8 @@ g_raid_tr_iostart_raid1(struct g_raid_tr_object *tr, struct bio *bp) g_raid_tr_iostart_raid1_read(tr, bp); break; case BIO_WRITE: - g_raid_tr_iostart_raid1_write(tr, bp); - break; case BIO_DELETE: - g_raid_iodone(bp, EIO); + g_raid_tr_iostart_raid1_write(tr, bp); break; case BIO_FLUSH: g_raid_tr_flush_common(tr, bp); @@ -893,7 +891,7 @@ rebuild_round_done: g_raid_unlock_range(sd->sd_volume, bp->bio_offset, bp->bio_length); } - if (pbp->bio_cmd != BIO_READ) { + if (pbp->bio_cmd == BIO_WRITE) { if (pbp->bio_inbed == 1 || pbp->bio_error != 0) pbp->bio_error = bp->bio_error; if (bp->bio_error != 0) { |