Lines Matching refs:vol
103 g_raid_tr_taste_raid5(struct g_raid_tr_object *tr, struct g_raid_volume *vol)
132 g_raid_tr_update_state_raid5(struct g_raid_volume *vol,
140 sc = vol->v_softc;
141 trs = (struct g_raid_tr_raid5_object *)vol->v_tr;
148 na = g_raid_nsubdisks(vol, G_RAID_SUBDISK_S_ACTIVE);
149 ns = g_raid_nsubdisks(vol, G_RAID_SUBDISK_S_STALE) +
150 g_raid_nsubdisks(vol, G_RAID_SUBDISK_S_RESYNC);
151 nu = g_raid_nsubdisks(vol, G_RAID_SUBDISK_S_UNINITIALIZED);
152 if (na == vol->v_disks_count)
154 else if (na + ns == vol->v_disks_count ||
155 na + ns + nu == vol->v_disks_count /* XXX: Temporary. */)
157 else if (na == vol->v_disks_count - 1 ||
158 na + ns + nu == vol->v_disks_count)
163 if (s != vol->v_state) {
164 g_raid_event_send(vol, G_RAID_VOLUME_S_ALIVE(s) ?
167 g_raid_change_volume_state(vol, s);
169 g_raid_write_metadata(sc, vol, NULL, NULL);
187 struct g_raid_volume *vol;
191 vol = tr->tro_volume;
192 vol->v_read_only = 1;
193 g_raid_tr_update_state_raid5(vol, NULL);
201 struct g_raid_volume *vol;
204 vol = tr->tro_volume;
207 g_raid_tr_update_state_raid5(vol, NULL);
214 struct g_raid_volume *vol;
223 vol = tr->tro_volume;
225 strip_size = vol->v_strip_size;
242 ddisks = vol->v_disks_count - pdisks;
251 pno = (nstripe / (ddisks * protate)) % vol->v_disks_count;
256 pno += vol->v_disks_count;
265 no = (pno + pdisks + no) % vol->v_disks_count;
269 no += imax(0, pno + pdisks - vol->v_disks_count);
284 cbp->bio_caller1 = &vol->v_subdisks[no];
288 no %= vol->v_disks_count;
290 no = (no + pdisks) % vol->v_disks_count;
292 no %= vol->v_disks_count;
299 pno += vol->v_disks_count - 1;
300 pno %= vol->v_disks_count;
302 no = (pno + pdisks) % vol->v_disks_count;
308 if (no >= vol->v_disks_count) {
309 no -= vol->v_disks_count;
315 pno += vol->v_disks_count - 1;
316 pno %= vol->v_disks_count;
321 no += imax(0, pno + pdisks - vol->v_disks_count);
346 struct g_raid_volume *vol;
348 vol = tr->tro_volume;
349 if (vol->v_state < G_RAID_VOLUME_S_SUBOPTIMAL) {
365 bp->bio_cmd, vol->v_name));