Lines Matching refs:vertex

37  *   its name (see dict.c).  A vertex's type attribute designates the type
48 * adds a GVT_SVC vertex for the service if one does not already exist, adds
49 * a GVT_INST vertex named by the FMRI of the instance, and sets up the edges.
50 * The resulting web of vertices & edges associated with an instance's vertex
53 * - an edge from the GVT_SVC vertex for the instance's service
55 * - an edge to the GVT_INST vertex of the instance's resarter, if its
61 * snapshot, an edge to a GVT_GROUP vertex named by the FMRI of the
65 * group, an edge from the corresponding GVT_GROUP vertex to a
66 * GVT_INST, GVT_SVC, or GVT_FILE vertex
70 * After the edges are set up the vertex's GV_CONFIGURED flag is set. If
96 * the vertex to disable with the GV_TODISABLE flag. Once the tree is created,
99 * In gt_enter_offline and gt_enter_maint if the vertex was in a subtree then
102 * the GV_TODISABLE flag). If the vertex to disable is also part of a larger
104 * once the first vertex is disabled (GV_TODISABLE flag is removed), we
105 * continue to propagate the offline event to the vertex's dependencies.
174 #define VERTEX_REMOVED 0 /* vertex has been freed */
175 #define VERTEX_INUSE 1 /* vertex is still in use */
219 * services on which the target vertex depends.
312 * values, as the vertex id is always the first element of a
379 * Creates a new vertex with the given name, adds it to the graph, and returns
550 * Given a vertex, this function will walk either dependencies
551 * (WALK_DEPENDENCIES) or dependents (WALK_DEPENDENTS) of a vertex recursively
552 * for the entire graph. It will avoid cycles and never visit the same vertex
561 * dependents of each vertex. The second is called on each vertex after
563 * after the target vertex has been found.
574 uchar_t *gi_visited; /* vertex bitmap */
594 * Check to see if we've visited this vertex already.
631 * If given a post-callback, call the function for every vertex.
670 int id; /* id of vertex to look for */
673 * While the vertex is not found, path is NULL. After the search, if
674 * the vertex was found then path should point to a -1-terminated
675 * array of vertex id's which constitute the path to the vertex.
939 * Return VERTEX_REMOVED when the vertex passed in argument is deleted from the
1038 uu_warn("%s:%d: Bad vertex type %d.\n", __FILE__, __LINE__,
1066 * Insert a vertex without sending any restarter events. If the vertex
1151 * If this vertex is in the subgraph, mark it as so, for both
1153 * A GVT_SERVICE vertex can only be in the subgraph if another instance
1156 * GVT_SERVICE vertex was freshly added (by the code above), it means
1160 * code to add a GVT_SERVICE vertex which should be in the subgraph.
1197 /* Check if the dependency adds the "to" vertex to the subgraph */
1437 uu_warn("%s:%d: Unexpected vertex type %d.\n", __FILE__,
1508 uu_warn("%s:%d: Unexpected vertex state %d.\n",
1527 uu_warn("%s:%d: Unexpected vertex type %d.\n", __FILE__,
1563 uu_warn("%s:%d: Unexpected vertex type %d.\n",
1577 * vertex. Return 1 if they are, 0 if they aren't, and -1 if they won't be
1591 * a group vertex, or of an instance vertex.
1610 * Any vertex with the GV_TOOFFLINE flag set is guaranteed
1636 uu_warn("%s:%d: Unexpected vertex state %d.\n",
1701 * This function is used when the given vertex changes state in such a way that
1775 uu_warn("%s:%d: Unknown vertex type %d.\n", __FILE__, __LINE__,
1840 uu_warn("%s:%d: Unknown vertex type %d.\n", __FILE__, __LINE__,
1863 /* if the vertex is already going offline, return */
1931 graph_enable_by_vertex(graph_vertex_t *vertex, int enable, int admin)
1937 assert((vertex->gv_flags & GV_CONFIGURED));
1939 vertex->gv_flags = (vertex->gv_flags & ~GV_ENABLED) |
1943 if (vertex->gv_state != RESTARTER_STATE_OFFLINE &&
1944 vertex->gv_state != RESTARTER_STATE_DEGRADED &&
1945 vertex->gv_state != RESTARTER_STATE_ONLINE) {
1947 * In case the vertex was notified to go down,
1951 vertex->gv_flags &= ~GV_TOOFFLINE;
1952 vertex->gv_flags &= ~GV_TODISABLE;
1954 vertex_send_event(vertex, RESTARTER_EVENT_TYPE_ENABLE);
1965 if (vertex->gv_state == RESTARTER_STATE_DISABLED)
1969 vertex_send_event(vertex, RESTARTER_EVENT_TYPE_DISABLE);
1989 vertex->gv_flags |= GV_TOOFFLINE;
1991 /* remember which vertex to disable... */
1992 vertex->gv_flags |= GV_TODISABLE;
1995 "disabling %s.\n", vertex->gv_name);
1998 r = uu_list_walk(vertex->gv_dependents, (uu_walk_fn_t *)mark_subtree,
2003 if (insubtree_dependents_down(vertex) == B_TRUE) {
2004 vertex_send_event(vertex, RESTARTER_EVENT_TYPE_ADMIN_DISABLE);
2015 /* skip the vertex we are disabling for now */
2016 if (v == vertex)
2039 v->gv_name, vertex->gv_name);
2048 * Set the restarter for v to fmri_arg. That is, make sure a vertex for
2313 graph_vertex_t *v; /* GVT_GROUP vertex */
2323 * Find or create a vertex for fmri and make info->v depend on it.
2349 /* Get or create vertex for FMRI */
2385 * We must canonify fmri & add a vertex for it.
2444 /* Add dependency from depgroup_v to new vertex */
2517 graph_vertex_t *v; /* GVT_INST vertex */
2640 /* Create depgroup vertex for pg */
2646 /* Add dependency from inst vertex to new vertex */
2648 /* ELOOP can't happen because this should be a new vertex */
2702 * Mark the vertex as configured during dependency insertion to avoid
2756 * Increment the vertex's reference count to prevent the vertex removal
2768 * Decrement the vertex's reference count and remove the vertex from
2771 * Return VERTEX_REMOVED when the vertex has been removed otherwise
2786 * When run on the dependencies of a vertex, populates list with
2788 * vertices (no GVT_GROUP nodes) on which the vertex depends.
2790 * Increment the vertex's reference count once the vertex is inserted
2791 * in the list. The vertex won't be able to be deleted from the dgraph
2817 uu_warn("%s:%d: Unexpected vertex type %d.\n", __FILE__,
2830 * Because we are inserting the vertex in a list, we don't want
2831 * the vertex to be freed while the list is in use. In order to
2832 * achieve that, increment the vertex's reference count.
3168 * GV_DEATHROW flag on the vertex and create and set to true the
3792 uu_warn("%s:%d: Unexpected vertex state %d.\n",
4095 * If a configured vertex exists for inst_fmri, return EEXIST. If no vertex
4097 * this vertex dependent on it, and send _ADD_INSTANCE to the restarter.
4110 * deleted, or EEXIST if a configured vertex for inst_fmri already exists.
4122 /* Check for a vertex for inst_fmri. */
4140 /* Add the vertex. */
4160 * Locate the vertex for this property group's instance. If it doesn't exist
4164 * new restarter has a vertex, add a new dependency, and send _ADD_INSTANCE to
4186 /* Find the vertex for this service */
4451 * the vertex will never be considered as a leaf
4782 * Find the vertex for inst_name. If it doesn't exist, return ENOENT.
4847 * the vertex anyway.
4981 * If a vertex for fmri exists and it is enabled, send _DISABLE to the
4985 * one, mark it unconfigured and return. Otherwise remove the vertex. Always
5042 * If there are no (non-service) dependents, the vertex can be
5552 * ENOENT - a configured vertex does not exist for fmri (an error is logged)
6287 graph_vertex_t *vertex;
6310 vertex = vertex_get_by_name(inst_name);
6311 if (vertex == NULL) {
6313 log_framework(LOG_DEBUG, "%s: Can't find graph vertex. "
6397 vertex_send_event(vertex, admin_events[a]);
6423 r = dgraph_refresh_instance(vertex, inst);
6441 vertex_send_event(vertex, admin_events[a]);