Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/raid/tr_raid5.c
Show First 20 Lines • Show All 336 Lines • ▼ Show 20 Lines | if (bp->bio_error == 0) | ||||
bp->bio_error = ENOMEM; | bp->bio_error = ENOMEM; | ||||
g_raid_iodone(bp, bp->bio_error); | g_raid_iodone(bp, bp->bio_error); | ||||
} | } | ||||
static void | static void | ||||
g_raid_tr_iostart_raid5(struct g_raid_tr_object *tr, struct bio *bp) | g_raid_tr_iostart_raid5(struct g_raid_tr_object *tr, struct bio *bp) | ||||
{ | { | ||||
struct g_raid_volume *vol; | struct g_raid_volume *vol; | ||||
struct g_raid_tr_raid5_object *trs; | |||||
vol = tr->tro_volume; | vol = tr->tro_volume; | ||||
trs = (struct g_raid_tr_raid5_object *)tr; | |||||
if (vol->v_state < G_RAID_VOLUME_S_SUBOPTIMAL) { | if (vol->v_state < G_RAID_VOLUME_S_SUBOPTIMAL) { | ||||
g_raid_iodone(bp, EIO); | g_raid_iodone(bp, EIO); | ||||
return; | return; | ||||
} | } | ||||
switch (bp->bio_cmd) { | switch (bp->bio_cmd) { | ||||
case BIO_READ: | case BIO_READ: | ||||
g_raid_tr_iostart_raid5_read(tr, bp); | g_raid_tr_iostart_raid5_read(tr, bp); | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |