Changeset View
Changeset View
Standalone View
Standalone View
head/sys/geom/raid/tr_raid0.c
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | g_raid_tr_iostart_raid0(struct g_raid_tr_object *tr, struct bio *bp) | ||||
u_int no, strip_size; | u_int no, strip_size; | ||||
vol = tr->tro_volume; | vol = tr->tro_volume; | ||||
if (vol->v_state != G_RAID_VOLUME_S_OPTIMAL && | if (vol->v_state != G_RAID_VOLUME_S_OPTIMAL && | ||||
vol->v_state != G_RAID_VOLUME_S_SUBOPTIMAL) { | vol->v_state != G_RAID_VOLUME_S_SUBOPTIMAL) { | ||||
g_raid_iodone(bp, EIO); | g_raid_iodone(bp, EIO); | ||||
return; | return; | ||||
} | } | ||||
if (bp->bio_cmd == BIO_FLUSH) { | if (bp->bio_cmd == BIO_FLUSH || bp->bio_cmd == BIO_SPEEDUP) { | ||||
g_raid_tr_flush_common(tr, bp); | g_raid_tr_flush_common(tr, bp); | ||||
return; | return; | ||||
} | } | ||||
if ((bp->bio_flags & BIO_UNMAPPED) != 0) | if ((bp->bio_flags & BIO_UNMAPPED) != 0) | ||||
addr = NULL; | addr = NULL; | ||||
else | else | ||||
addr = bp->bio_data; | addr = bp->bio_data; | ||||
strip_size = vol->v_strip_size; | strip_size = vol->v_strip_size; | ||||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |