Lines Matching refs:vol
97 g_raid_tr_update_state_concat(struct g_raid_volume *vol) in g_raid_tr_update_state_concat() argument
105 sc = vol->v_softc; in g_raid_tr_update_state_concat()
106 trs = (struct g_raid_tr_concat_object *)vol->v_tr; in g_raid_tr_update_state_concat()
112 n = g_raid_nsubdisks(vol, G_RAID_SUBDISK_S_ACTIVE); in g_raid_tr_update_state_concat()
113 f = g_raid_nsubdisks(vol, G_RAID_SUBDISK_S_FAILED); in g_raid_tr_update_state_concat()
114 if (n + f == vol->v_disks_count) { in g_raid_tr_update_state_concat()
122 if (s != vol->v_state) { in g_raid_tr_update_state_concat()
127 if (vol->v_raid_level == G_RAID_VOLUME_RL_CONCAT && in g_raid_tr_update_state_concat()
129 !G_RAID_VOLUME_S_ALIVE(vol->v_state)) { in g_raid_tr_update_state_concat()
131 for (i = 0; i < vol->v_disks_count; i++) { in g_raid_tr_update_state_concat()
132 if (vol->v_subdisks[i].sd_state != in g_raid_tr_update_state_concat()
134 size += vol->v_subdisks[i].sd_size; in g_raid_tr_update_state_concat()
136 vol->v_mediasize = size; in g_raid_tr_update_state_concat()
139 g_raid_event_send(vol, G_RAID_VOLUME_S_ALIVE(s) ? in g_raid_tr_update_state_concat()
142 g_raid_change_volume_state(vol, s); in g_raid_tr_update_state_concat()
144 g_raid_write_metadata(sc, vol, NULL, NULL); in g_raid_tr_update_state_concat()
155 struct g_raid_volume *vol; in g_raid_tr_event_concat() local
159 vol = tr->tro_volume; in g_raid_tr_event_concat()
160 sc = vol->v_softc; in g_raid_tr_event_concat()
168 vol->v_name, sd->sd_pos, in g_raid_tr_event_concat()
174 g_raid_write_metadata(sc, vol, sd, NULL); in g_raid_tr_event_concat()
175 g_raid_tr_update_state_concat(vol); in g_raid_tr_event_concat()
183 struct g_raid_volume *vol; in g_raid_tr_start_concat() local
186 vol = tr->tro_volume; in g_raid_tr_start_concat()
188 g_raid_tr_update_state_concat(vol); in g_raid_tr_start_concat()
196 struct g_raid_volume *vol; in g_raid_tr_stop_concat() local
199 vol = tr->tro_volume; in g_raid_tr_stop_concat()
202 g_raid_tr_update_state_concat(vol); in g_raid_tr_stop_concat()
209 struct g_raid_volume *vol; in g_raid_tr_iostart_concat() local
217 vol = tr->tro_volume; in g_raid_tr_iostart_concat()
218 if (vol->v_state != G_RAID_VOLUME_S_OPTIMAL && in g_raid_tr_iostart_concat()
219 vol->v_state != G_RAID_VOLUME_S_SUBOPTIMAL) { in g_raid_tr_iostart_concat()
235 while (no < vol->v_disks_count && in g_raid_tr_iostart_concat()
236 offset >= vol->v_subdisks[no].sd_size) { in g_raid_tr_iostart_concat()
237 offset -= vol->v_subdisks[no].sd_size; in g_raid_tr_iostart_concat()
240 if (no >= vol->v_disks_count) { in g_raid_tr_iostart_concat()
246 sd = &vol->v_subdisks[no]; in g_raid_tr_iostart_concat()
269 } while (remain > 0 && no < vol->v_disks_count); in g_raid_tr_iostart_concat()
289 struct g_raid_volume *vol; in g_raid_tr_kerneldump_concat() local
295 vol = tr->tro_volume; in g_raid_tr_kerneldump_concat()
296 if (vol->v_state != G_RAID_VOLUME_S_OPTIMAL) in g_raid_tr_kerneldump_concat()
303 while (no < vol->v_disks_count && in g_raid_tr_kerneldump_concat()
304 offset >= vol->v_subdisks[no].sd_size) { in g_raid_tr_kerneldump_concat()
305 offset -= vol->v_subdisks[no].sd_size; in g_raid_tr_kerneldump_concat()
308 if (no >= vol->v_disks_count) in g_raid_tr_kerneldump_concat()
311 sd = &vol->v_subdisks[no]; in g_raid_tr_kerneldump_concat()
313 error = g_raid_subdisk_kerneldump(&vol->v_subdisks[no], in g_raid_tr_kerneldump_concat()
321 } while (remain > 0 && no < vol->v_disks_count); in g_raid_tr_kerneldump_concat()