Lines Matching defs:pos

58 	struct iodev_snapshot *pos;
61 for (pos = list; pos; pos = pos->is_next) {
62 if (strcmp(pos->is_name, name) == 0)
63 return (pos);
65 pos2 = find_iodev_by_name(pos->is_children, name);
100 struct iodev_snapshot *pos;
111 for (pos = ss->s_iodevs; pos; pos = pos->is_next) {
112 if (pos->is_type != IODEV_CONTROLLER)
114 if (pos->is_id.id != iodev->is_parent_id.id)
116 return (pos);
122 pos = make_controller(iodev->is_parent_id.id);
123 insert_iodev(ss, pos);
124 return (pos);
128 for (pos = ss->s_iodevs; pos; pos = pos->is_next) {
129 if (id_match(&iodev->is_parent_id, &pos->is_id) &&
130 pos->is_type == IODEV_DISK)
131 return (pos);
132 if (pos->is_type != IODEV_CONTROLLER)
134 for (pos2 = pos->is_children; pos2; pos2 = pos2->is_next) {
201 ix_insert_here(struct iodev_snapshot *pos, struct iodev_snapshot *elem, int ba)
203 avl_tree_t *l = pos->avl_list;
209 avl_insert_here(l, elem, pos, ba);
213 list_del(struct iodev_snapshot **list, struct iodev_snapshot *pos)
215 ix_list_del(pos);
217 if (*list == pos)
218 *list = pos->is_next;
219 if (pos->is_next)
220 pos->is_next->is_prev = pos->is_prev;
221 if (pos->is_prev)
222 pos->is_prev->is_next = pos->is_next;
223 pos->is_prev = pos->is_next = NULL;
227 insert_before(struct iodev_snapshot **list, struct iodev_snapshot *pos,
230 if (pos == NULL) {
237 new->is_next = pos;
238 new->is_prev = pos->is_prev;
239 if (pos->is_prev)
240 pos->is_prev->is_next = new;
243 pos->is_prev = new;
245 ix_insert_here(pos, new, AVL_BEFORE);
249 insert_after(struct iodev_snapshot **list, struct iodev_snapshot *pos,
252 if (pos == NULL) {
259 new->is_next = pos->is_next;
260 new->is_prev = pos;
261 if (pos->is_next)
262 pos->is_next->is_prev = new;
263 pos->is_next = new;
265 ix_insert_here(pos, new, AVL_AFTER);
406 struct iodev_snapshot *pos, *ppos, *tmp, *ptmp;
417 pos = iodevs;
418 while (pos && nr_iodevs) {
419 tmp = pos;
420 pos = pos->is_next;
443 if (pos == ptmp)
444 pos = ppos;
458 pos = iodevs;
459 while (pos && nr_iodevs) {
460 tmp = pos;
461 pos = pos->is_next;
475 pos = iodevs;
476 while (pos) {
477 struct iodev_snapshot *tmp = pos;
478 pos = pos->is_next;
505 struct iodev_snapshot *pos;
508 for (pos = list; pos; pos = pos->is_next) {
510 if (pos->is_ksp != NULL) {
511 if (kstat_read(kc, pos->is_ksp, &pos->is_stats) == -1)
514 pos->is_crtime = pos->is_ksp->ks_crtime;
515 pos->is_snaptime = pos->is_ksp->ks_snaptime;
518 if ((err = acquire_iodev_stats(pos->is_children, kc)))
521 if (pos->is_type == IODEV_CONTROLLER) {
522 struct iodev_snapshot *pos2 = pos->is_children;
525 if ((err = collate_controller(pos, pos2)))
885 struct iodev_snapshot *pos, *entry, *parent;
903 pos = (parent == NULL) ? NULL : parent->is_children;
904 for (; pos; pos = pos->is_next) {
905 if (pos->is_id.id != -1 &&
906 pos->is_id.id == initiator &&
907 pos->is_type == IODEV_IOPATH_LI) {
909 update_target(pos, entry);
913 entry = pos;
918 if (!pos) {
920 pos = make_extended_device(
922 update_target(pos, entry);
926 entry, pos);
931 pos);
935 entry = pos;
949 struct iodev_snapshot *entry, *parent, *pos;
967 pos = (parent == NULL) ? NULL : parent->is_children;
968 for (; pos; pos = pos->is_next) {
969 if (pos->is_id.id != -1 &&
970 pos->is_id.id == tgt &&
971 pos->is_type == IODEV_IOPATH_LT) {
973 update_target(pos, entry);
978 if (!pos) {
979 pos = make_extended_device(
981 update_target(pos, entry);
985 entry, pos);
989 entry, pos);
1017 struct iodev_snapshot *pos;
1043 if ((pos = malloc(sizeof (struct iodev_snapshot))) == NULL) {
1048 (void) memset(pos, 0, sizeof (struct iodev_snapshot));
1050 pos->is_type = type;
1051 pos->is_crtime = ksp->ks_crtime;
1052 pos->is_snaptime = ksp->ks_snaptime;
1053 pos->is_id.id = IODEV_NO_ID;
1054 pos->is_parent_id.id = IODEV_NO_ID;
1055 pos->is_ksp = ksp;
1056 pos->is_instance = ksp->ks_instance;
1058 (void) strlcpy(pos->is_module, ksp->ks_module, KSTAT_STRLEN);
1059 (void) strlcpy(pos->is_name, ksp->ks_name, KSTAT_STRLEN);
1060 get_pretty_name(ss->s_types, pos, kc);
1066 insert_into(&list, pos);