Lines Matching defs:pos

59 	struct iodev_snapshot *pos;
62 for (pos = list; pos; pos = pos->is_next) {
63 if (strcmp(pos->is_name, name) == 0)
64 return (pos);
66 pos2 = find_iodev_by_name(pos->is_children, name);
101 struct iodev_snapshot *pos;
112 for (pos = ss->s_iodevs; pos; pos = pos->is_next) {
113 if (pos->is_type != IODEV_CONTROLLER)
115 if (pos->is_id.id != iodev->is_parent_id.id)
117 return (pos);
123 pos = make_controller(iodev->is_parent_id.id);
124 insert_iodev(ss, pos);
125 return (pos);
129 for (pos = ss->s_iodevs; pos; pos = pos->is_next) {
130 if (id_match(&iodev->is_parent_id, &pos->is_id) &&
131 pos->is_type == IODEV_DISK)
132 return (pos);
133 if (pos->is_type != IODEV_CONTROLLER)
135 for (pos2 = pos->is_children; pos2; pos2 = pos2->is_next) {
199 ix_insert_here(struct iodev_snapshot *pos, struct iodev_snapshot *elem, int ba)
201 avl_tree_t *l = pos->avl_list;
207 avl_insert_here(l, elem, pos, ba);
211 list_del(struct iodev_snapshot **list, struct iodev_snapshot *pos)
213 ix_list_del(pos);
215 if (*list == pos)
216 *list = pos->is_next;
217 if (pos->is_next)
218 pos->is_next->is_prev = pos->is_prev;
219 if (pos->is_prev)
220 pos->is_prev->is_next = pos->is_next;
221 pos->is_prev = pos->is_next = NULL;
225 insert_before(struct iodev_snapshot **list, struct iodev_snapshot *pos,
228 if (pos == NULL) {
235 new->is_next = pos;
236 new->is_prev = pos->is_prev;
237 if (pos->is_prev)
238 pos->is_prev->is_next = new;
241 pos->is_prev = new;
243 ix_insert_here(pos, new, AVL_BEFORE);
247 insert_after(struct iodev_snapshot **list, struct iodev_snapshot *pos,
250 if (pos == NULL) {
257 new->is_next = pos->is_next;
258 new->is_prev = pos;
259 if (pos->is_next)
260 pos->is_next->is_prev = new;
261 pos->is_next = new;
263 ix_insert_here(pos, new, AVL_AFTER);
404 struct iodev_snapshot *pos, *ppos, *tmp, *ptmp;
415 pos = iodevs;
416 while (pos && nr_iodevs) {
417 tmp = pos;
418 pos = pos->is_next;
441 if (pos == ptmp)
442 pos = ppos;
456 pos = iodevs;
457 while (pos && nr_iodevs) {
458 tmp = pos;
459 pos = pos->is_next;
473 pos = iodevs;
474 while (pos) {
475 struct iodev_snapshot *tmp = pos;
476 pos = pos->is_next;
503 struct iodev_snapshot *pos;
506 for (pos = list; pos; pos = pos->is_next) {
508 if (pos->is_ksp != NULL) {
509 if (kstat_read(kc, pos->is_ksp, &pos->is_stats) == -1)
512 pos->is_crtime = pos->is_ksp->ks_crtime;
513 pos->is_snaptime = pos->is_ksp->ks_snaptime;
516 if ((err = acquire_iodev_stats(pos->is_children, kc)))
519 if (pos->is_type == IODEV_CONTROLLER) {
520 struct iodev_snapshot *pos2 = pos->is_children;
523 if ((err = collate_controller(pos, pos2)))
880 struct iodev_snapshot *pos, *entry, *parent;
898 pos = (parent == NULL) ? NULL : parent->is_children;
899 for (; pos; pos = pos->is_next) {
900 if (pos->is_id.id != -1 &&
901 pos->is_id.id == initiator &&
902 pos->is_type == IODEV_IOPATH_LI) {
904 update_target(pos, entry);
908 entry = pos;
913 if (!pos) {
915 pos = make_extended_device(
917 update_target(pos, entry);
921 entry, pos);
926 pos);
930 entry = pos;
944 struct iodev_snapshot *entry, *parent, *pos;
962 pos = (parent == NULL) ? NULL : parent->is_children;
963 for (; pos; pos = pos->is_next) {
964 if (pos->is_id.id != -1 &&
965 pos->is_id.id == tgt &&
966 pos->is_type == IODEV_IOPATH_LT) {
968 update_target(pos, entry);
973 if (!pos) {
974 pos = make_extended_device(
976 update_target(pos, entry);
980 entry, pos);
984 entry, pos);
1012 struct iodev_snapshot *pos;
1038 if ((pos = malloc(sizeof (struct iodev_snapshot))) == NULL) {
1043 (void) memset(pos, 0, sizeof (struct iodev_snapshot));
1045 pos->is_type = type;
1046 pos->is_crtime = ksp->ks_crtime;
1047 pos->is_snaptime = ksp->ks_snaptime;
1048 pos->is_id.id = IODEV_NO_ID;
1049 pos->is_parent_id.id = IODEV_NO_ID;
1050 pos->is_ksp = ksp;
1051 pos->is_instance = ksp->ks_instance;
1053 (void) strlcpy(pos->is_module, ksp->ks_module, KSTAT_STRLEN);
1054 (void) strlcpy(pos->is_name, ksp->ks_name, KSTAT_STRLEN);
1055 get_pretty_name(ss->s_types, pos, kc);
1061 insert_into(&list, pos);