Lines Matching defs:path
135 * Number of times path discovery will be attempted during early boot.
139 * Number of times path discovery will be attempted after early boot.
163 * The "path" to a pathinfo node is identical to the /devices path to a
165 * a vHCI. This pathinfo "path" is associated with a 'path_instance'.
169 static uint_t mdi_pathmap_instance = 1; /* 0 -> any path */
172 static mod_hash_t *mdi_pathmap_bypath; /* "path"->instance */
173 static mod_hash_t *mdi_pathmap_byinstance; /* instance->"path" */
333 /* Allocate ['path_instance' <-> "path"] maps */
807 * vHCI on a threads that went down the code path leading to
810 * operations which enter the vHCI and the enter down the path
898 * with vHCI power management code during path online/offline. Each
1024 * get number of path information nodes associated with a given
1657 * Utility function to get number of path information nodes
1791 /* A path to the client is being freed */
1814 * We do not allow failovers to progress while client path state
1914 * would go on the same path. This would improve the
1977 "lba %llx: path %s %p",
1985 * select a path to access a client device.
1988 * select a path to route the I/O request to. The caller passes
1991 * contents to maintain per path statistics (total I/O size /
1993 * select, the framework automatically selects a suitable path
1998 * By default this function returns a suitable path in online
2000 * we support LOAD_BALANCE_NONE (Previously selected online path
2001 * will continue to be used till the path is usable) and
2010 * then the argument is the "path instance" of the path to select.
2013 * walk and find the next appropriate path. The following values
2015 * ONLINE path) and/or MDI_SELECT_STANDBY_PATH (to select an
2016 * STANDBY path).
2019 * whenever it has to use a STANDBY/FAULTED path. Eg. during
2021 * when the STANDBY path comes up first), during failover
2022 * (to activate a STANDBY path as ONLINE).
2024 * The selected path is returned in a a mdi_hold_path() state
2031 * MDI_NOPATH - Client device is online, but no valid path are
2051 int preferred = 1; /* preferred path */
2055 int path_instance; /* request specific path instance */
2108 * If not so, let the vHCI driver manually select a path
2129 /* Caller is specifying a specific pathinfo path by path_instance */
2137 /* If path can't be selected then MDI_NOPATH is returned. */
2144 * Verify state of path. When asked to select a specific
2145 * path_instance, we select the requested path in any
2150 * that path has detached (but pi_phci will be NULL if that
2169 * Return the path in hold state. Caller should release the
2190 * Load balancing is None or Alternate path mode
2192 * last known selected path
2203 * No need to explicitly check if the path is disabled.
2211 * Return the path in hold state. Caller should
2229 * Keep looking for a next available online path
2248 * for an online path. Otherwise, if it is for a STANDBY
2249 * path request, it will go through and fetch an ONLINE
2250 * path which is not desirable.
2265 * mdi_pathinfo node starting from last known selected path
2269 * then lets just use the same path preference to continue the
2373 * No need to explicitly check if the path is disabled.
2379 * Return the path in hold state. Caller should
2398 * Keep looking for a next available online path
2445 * non-preferred path in the following
2496 * For a client, return the next available path to any phci
2534 * For a phci, return the next available path to any client
2629 * pHCI/Client device node whose path address matches "paddr".
2760 * unique device path is capable of having properties attached
2762 * path and client device node.
2764 * destroyed using mdi_pi_free() if the path is no longer
2881 * This is a new path for this client device. Allocate and
2924 * Allocate a mdi_pathinfo node and add to the pHCI path list
2935 static char path[MAXPATHLEN]; /* mdi_pathmap_mutex protects */
2964 * We form the "path" to the pathinfo node, and see if we have
2965 * already allocated a 'path_instance' for that "path". If so,
2968 * the "path" string (which is never freed). The association
2969 * between a 'path_instance' this "path" string persists until
2973 (void) ddi_pathname(ph->ph_dip, path);
2974 (void) sprintf(path + strlen(path), "/%s@%s",
2976 if (mod_hash_find(mdi_pathmap_bypath, (mod_hash_key_t)path, &hv) == 0) {
2979 /* allocate a new 'path_instance' and persistent "path" */
2981 path_persistent = i_ddi_strdup(path, KM_SLEEP);
2990 (void) snprintf(path, sizeof(path), "%s%d/%s@%s",
2993 path_persistent = i_ddi_strdup(path, KM_SLEEP);
3035 * Lookup of "path" by 'path_instance'. Return "path".
3036 * NOTE: returned "path" remains valid forever (until reboot).
3041 char *path;
3044 /* mdi_pathmap lookup of "path" by 'path_instance' */
3048 path = (char *)hv;
3050 path = NULL;
3052 return (path);
3063 char *path;
3066 /* mdi_pathmap lookup of "path" by 'path_instance' */
3070 path = (char *)hv;
3072 path = NULL;
3074 return (path);
3123 * is the last path to the device
3199 "!%d cmds still pending on path: %s %p",
3210 "!Timeout reached on path %s %p without the cond",
3213 "!%d cmds still pending on path %s %p",
3263 * Client lost its last path.
3294 * remove any per-path kstats
3335 mdi_pathinfo_t *path = NULL;
3340 path = ph->ph_path_head;
3341 while (path != NULL) {
3342 if (path == pip) {
3345 prev = path;
3346 path = (mdi_pathinfo_t *)MDI_PI(path)->pi_phci_link;
3349 if (path) {
3352 MDI_PI(prev)->pi_phci_link = MDI_PI(path)->pi_phci_link;
3355 (mdi_pathinfo_t *)MDI_PI(path)->pi_phci_link;
3357 if (ph->ph_path_tail == path) {
3372 * Remove a mdi_pathinfo node from client path list.
3378 mdi_pathinfo_t *path;
3383 path = ct->ct_path_head;
3384 while (path != NULL) {
3385 if (path == pip) {
3388 prev = path;
3389 path = (mdi_pathinfo_t *)MDI_PI(path)->pi_client_link;
3392 if (path) {
3396 MDI_PI(path)->pi_client_link;
3399 (mdi_pathinfo_t *)MDI_PI(path)->pi_client_link;
3401 if (ct->ct_path_tail == path) {
3404 if (ct->ct_path_last == path) {
3473 * If this path has not been initialized yet, Callback vHCI driver's
3562 * If this is a user initiated path online->offline operation
3670 * This is the last path case for
3685 * online as the path could not
3728 * Place the path_info node in the online state. The path is
3865 "!%d cmds still pending on path %s %p",
3876 "!Timeout reached on path %s %p without the cond",
3879 "!%d cmds still pending on path %s %p",
3898 "!vo_path_offline failed: vdip %s%d %p: path %s %p",
4018 /* Reset the path state */
4040 /* Reset the path state */
4105 * Return pointer to path to pathinfo node.
4135 mdi_pi_pathname_obp(mdi_pathinfo_t *pip, char *path)
4138 if ((pip == NULL) || (path == NULL))
4141 if (mdi_prop_lookup_string(pip, "obp-path", &obp_path) == MDI_SUCCESS) {
4142 (void) strcpy(path, obp_path);
4145 path = NULL;
4147 return (path);
4174 rc = mdi_prop_update_string(pip, "obp-path", obp_path);
4335 * Get the preferred path flag
4348 * Set the preferred path flag
4881 "path %d %s is %s: Load balancing: %s\n",
4889 "path %d %s is %s\n",
5176 * Check to see of we are removing the last path of this
5189 * This pHCI provides the critical path
5319 /* has no last path */
5337 /* Last path. Mark client dip as retiring */
5374 /* not last path */
5410 * Check to see of we are retiring the last path of this
5434 * offline the path(s) hanging off the pHCI. If the
5435 * last path to any client, check that constraints
5459 /* no last path and no pips */
5467 /* no last path and no pips */
5495 * Check to see of we are removing the last path of this
5506 * This is the last path to this client.
5512 * path - MPXIO will then fail all I/Os to the client).
5574 "path %d %s busy, cannot offline",
6068 * create and install per-path (client - pHCI) statistics
6126 * destroy per-path properties
6167 * I/O can be driven across a path prior to having path
6184 * Enable the path(specific client/target/initiator)
6185 * Enabling a path means that MPxIO may select the enabled path for routing
6186 * future I/O requests, subject to other path state constraints.
6196 "!failed: path %s %p: NULL ph",
6211 * Disable the path (specific client/target/initiator)
6212 * Disabling a path means that MPxIO will not select the disabled path for
6223 "!failed: path %s %p: NULL ph",
6237 * disable the path to a particular pHCI (pHCI specified in the phci_path
6239 * Disabling a path means that MPxIO will not select the disabled path for
6251 * Enable the path to a particular pHCI (pHCI specified in the phci_path
6253 * Enabling a path means that MPxIO may select the enabled path for routing
6254 * future I/O requests, subject to other path state constraints.
6278 * Check to make sure the path is not already in the
6279 * requested state. If it is just return the next path
6296 * know that path is about to get enabled/disabled.
6337 * know that path is now enabled/disabled.
6422 * path info's to each client.
7374 * When processing path hotunplug, represent device removal.
7404 * When processing hotplug, if a path marked mdi_pi_device_isremoved()
7447 * Memory for the returned filename which includes the full path is allocated
7788 * paddrnvl nvlist contains path information for a vhci client.
7832 /* the client must contain at least one path */
7864 * paddrs_nvl1, paddrs_nvl2, .. are nvlists that contain path information.
7875 * into to the phcis string array in the main nvlist to get the pHCI path.
8037 * Lookup vhcache phci structure for the specified phci path.
8189 * Add the specified path to the vhci cache if not already present.
8190 * Also add the vhcache client for the client corresponding to this path
8248 * Remove the reference to the specified path from the vhci cache.
8452 * first configure all path components upto phci and then configure
8559 * The path includes the child component in addition to the phci path.
8562 bus_config_one_phci_child(char *path)
8569 devnm = strrchr(path, '/');
8573 * first configure all path components upto phci and then
8576 if ((ph_dip = e_ddi_hold_devi_by_path(path, 0)) != NULL) {
8642 * Free the memory allocated for phci client path list.
8912 * If at least one path for the client is already online, the remaining paths
8914 * the paths until at least one path is online and then rest of the paths
8937 /* if at least one path is online, configure the rest asynchronously */
9216 * Do full path discovery at most once per mdi_path_discovery_interval.
9217 * This is to avoid a series of full path discoveries when opening
9424 mdi_vhcache_pathinfo_t *path, *nxt_path;
9433 path = client->cct_cpi_head;
9435 for ( ; path != NULL; path = nxt_path) {
9436 nxt_path = path->cpi_next;
9437 if ((path->cpi_cphci->cphci_phci != NULL) &&
9438 (path->cpi_pip != NULL)) {
9439 enqueue_tail_vhcache_pathinfo(client, path);
9440 } else if (path->cpi_pip != NULL) {
9441 /* Not valid to have a path without a phci. */
9442 free_vhcache_pathinfo(path);