Lines Matching defs:vertex

39  *   its name (see dict.c).  A vertex's type attribute designates the type
50 * adds a GVT_SVC vertex for the service if one does not already exist, adds
51 * a GVT_INST vertex named by the FMRI of the instance, and sets up the edges.
52 * The resulting web of vertices & edges associated with an instance's vertex
55 * - an edge from the GVT_SVC vertex for the instance's service
57 * - an edge to the GVT_INST vertex of the instance's resarter, if its
63 * snapshot, an edge to a GVT_GROUP vertex named by the FMRI of the
67 * group, an edge from the corresponding GVT_GROUP vertex to a
68 * GVT_INST, GVT_SVC, or GVT_FILE vertex
72 * After the edges are set up the vertex's GV_CONFIGURED flag is set. If
98 * the vertex to disable with the GV_TODISABLE flag. Once the tree is created,
101 * In gt_enter_offline and gt_enter_maint if the vertex was in a subtree then
104 * the GV_TODISABLE flag). If the vertex to disable is also part of a larger
106 * once the first vertex is disabled (GV_TODISABLE flag is removed), we
107 * continue to propagate the offline event to the vertex's dependencies.
176 #define VERTEX_REMOVED 0 /* vertex has been freed */
177 #define VERTEX_INUSE 1 /* vertex is still in use */
221 * services on which the target vertex depends.
314 * values, as the vertex id is always the first element of a
381 * Creates a new vertex with the given name, adds it to the graph, and returns
552 * Given a vertex, this function will walk either dependencies
553 * (WALK_DEPENDENCIES) or dependents (WALK_DEPENDENTS) of a vertex recursively
554 * for the entire graph. It will avoid cycles and never visit the same vertex
563 * dependents of each vertex. The second is called on each vertex after
565 * after the target vertex has been found.
576 uchar_t *gi_visited; /* vertex bitmap */
596 * Check to see if we've visited this vertex already.
633 * If given a post-callback, call the function for every vertex.
672 int id; /* id of vertex to look for */
675 * While the vertex is not found, path is NULL. After the search, if
676 * the vertex was found then path should point to a -1-terminated
677 * array of vertex id's which constitute the path to the vertex.
941 * Return VERTEX_REMOVED when the vertex passed in argument is deleted from the
1040 uu_warn("%s:%d: Bad vertex type %d.\n", __FILE__, __LINE__,
1068 * Insert a vertex without sending any restarter events. If the vertex
1153 * If this vertex is in the subgraph, mark it as so, for both
1155 * A GVT_SERVICE vertex can only be in the subgraph if another instance
1158 * GVT_SERVICE vertex was freshly added (by the code above), it means
1162 * code to add a GVT_SERVICE vertex which should be in the subgraph.
1199 /* Check if the dependency adds the "to" vertex to the subgraph */
1439 uu_warn("%s:%d: Unexpected vertex type %d.\n", __FILE__,
1510 uu_warn("%s:%d: Unexpected vertex state %d.\n",
1529 uu_warn("%s:%d: Unexpected vertex type %d.\n", __FILE__,
1565 uu_warn("%s:%d: Unexpected vertex type %d.\n",
1579 * vertex. Return 1 if they are, 0 if they aren't, and -1 if they won't be
1593 * a group vertex, or of an instance vertex.
1612 * Any vertex with the GV_TOOFFLINE flag set is guaranteed
1638 uu_warn("%s:%d: Unexpected vertex state %d.\n",
1703 * This function is used when the given vertex changes state in such a way that
1777 uu_warn("%s:%d: Unknown vertex type %d.\n", __FILE__, __LINE__,
1842 uu_warn("%s:%d: Unknown vertex type %d.\n", __FILE__, __LINE__,
1865 /* if the vertex is already going offline, return */
1933 graph_enable_by_vertex(graph_vertex_t *vertex, int enable, int admin)
1939 assert((vertex->gv_flags & GV_CONFIGURED));
1941 vertex->gv_flags = (vertex->gv_flags & ~GV_ENABLED) |
1945 if (vertex->gv_state != RESTARTER_STATE_OFFLINE &&
1946 vertex->gv_state != RESTARTER_STATE_DEGRADED &&
1947 vertex->gv_state != RESTARTER_STATE_ONLINE) {
1949 * In case the vertex was notified to go down,
1953 vertex->gv_flags &= ~GV_TOOFFLINE;
1954 vertex->gv_flags &= ~GV_TODISABLE;
1956 vertex_send_event(vertex, RESTARTER_EVENT_TYPE_ENABLE);
1967 if (vertex->gv_state == RESTARTER_STATE_DISABLED)
1971 vertex_send_event(vertex, RESTARTER_EVENT_TYPE_DISABLE);
1991 vertex->gv_flags |= GV_TOOFFLINE;
1993 /* remember which vertex to disable... */
1994 vertex->gv_flags |= GV_TODISABLE;
1997 "disabling %s.\n", vertex->gv_name);
2000 r = uu_list_walk(vertex->gv_dependents, (uu_walk_fn_t *)mark_subtree,
2005 if (insubtree_dependents_down(vertex) == B_TRUE) {
2006 vertex_send_event(vertex, RESTARTER_EVENT_TYPE_ADMIN_DISABLE);
2017 /* skip the vertex we are disabling for now */
2018 if (v == vertex)
2041 v->gv_name, vertex->gv_name);
2050 * Set the restarter for v to fmri_arg. That is, make sure a vertex for
2315 graph_vertex_t *v; /* GVT_GROUP vertex */
2325 * Find or create a vertex for fmri and make info->v depend on it.
2351 /* Get or create vertex for FMRI */
2387 * We must canonify fmri & add a vertex for it.
2446 /* Add dependency from depgroup_v to new vertex */
2519 graph_vertex_t *v; /* GVT_INST vertex */
2642 /* Create depgroup vertex for pg */
2648 /* Add dependency from inst vertex to new vertex */
2650 /* ELOOP can't happen because this should be a new vertex */
2704 * Mark the vertex as configured during dependency insertion to avoid
2758 * Increment the vertex's reference count to prevent the vertex removal
2770 * Decrement the vertex's reference count and remove the vertex from
2773 * Return VERTEX_REMOVED when the vertex has been removed otherwise
2788 * When run on the dependencies of a vertex, populates list with
2790 * vertices (no GVT_GROUP nodes) on which the vertex depends.
2792 * Increment the vertex's reference count once the vertex is inserted
2793 * in the list. The vertex won't be able to be deleted from the dgraph
2819 uu_warn("%s:%d: Unexpected vertex type %d.\n", __FILE__,
2832 * Because we are inserting the vertex in a list, we don't want
2833 * the vertex to be freed while the list is in use. In order to
2834 * achieve that, increment the vertex's reference count.
3170 * GV_DEATHROW flag on the vertex and create and set to true the
3788 uu_warn("%s:%d: Unexpected vertex state %d.\n",
4091 * If a configured vertex exists for inst_fmri, return EEXIST. If no vertex
4093 * this vertex dependent on it, and send _ADD_INSTANCE to the restarter.
4106 * deleted, or EEXIST if a configured vertex for inst_fmri already exists.
4118 /* Check for a vertex for inst_fmri. */
4136 /* Add the vertex. */
4156 * Locate the vertex for this property group's instance. If it doesn't exist
4160 * new restarter has a vertex, add a new dependency, and send _ADD_INSTANCE to
4182 /* Find the vertex for this service */
4447 * the vertex will never be considered as a leaf
4778 * Find the vertex for inst_name. If it doesn't exist, return ENOENT.
4843 * the vertex anyway.
4977 * If a vertex for fmri exists and it is enabled, send _DISABLE to the
4981 * one, mark it unconfigured and return. Otherwise remove the vertex. Always
5038 * If there are no (non-service) dependents, the vertex can be
5548 * ENOENT - a configured vertex does not exist for fmri (an error is logged)
6283 graph_vertex_t *vertex;
6306 vertex = vertex_get_by_name(inst_name);
6307 if (vertex == NULL) {
6309 log_framework(LOG_DEBUG, "%s: Can't find graph vertex. "
6393 vertex_send_event(vertex, admin_events[a]);
6419 r = dgraph_refresh_instance(vertex, inst);
6437 vertex_send_event(vertex, admin_events[a]);