return r;
}
-static const struct dm_info *_cached_info(struct dm_pool *mem,
- struct dm_tree *dtree,
- const struct logical_volume *lv,
- const char *layer)
+static const struct dm_info *_cached_dm_info(struct dm_pool *mem,
+ struct dm_tree *dtree,
+ const struct logical_volume *lv,
+ const char *layer)
{
char *dlid;
const struct dm_tree_node *dnode;
if (!dm->activation) {
/* Setup callback for non-activation partial tree */
/* Activation gets own callback when needed */
- /* TODO: extend _cached_info() to return dnode */
+ /* TODO: extend _cached_dm_info() to return dnode */
if (!(uuid = build_dm_uuid(dm->mem, lv, lv_layer(lv))))
return_0;
if ((node = dm_tree_find_node_by_uuid(dtree, uuid)) &&
if (!dm->activation) {
/* Setup callback for non-activation partial tree */
/* Activation gets own callback when needed */
- /* TODO: extend _cached_info() to return dnode */
+ /* TODO: extend _cached_dm_info() to return dnode */
if (!(uuid = build_dm_uuid(dm->mem, lv, lv_layer(lv))))
return_0;
if ((node = dm_tree_find_node_by_uuid(dtree, uuid)) &&
dm_list_iterate_items(sl, &external_lv->segs_using_this_lv)
if ((sl->seg->external_lv == external_lv) &&
/* Add only active layered devices (also avoids loop) */
- _cached_info(dm->mem, dtree, sl->seg->lv,
- lv_layer(sl->seg->lv)) &&
+ _cached_dm_info(dm->mem, dtree, sl->seg->lv,
+ lv_layer(sl->seg->lv)) &&
!_add_new_lv_to_dtree(dm, dtree, sl->seg->lv,
laopts, lv_layer(sl->seg->lv)))
return_0;
* so just use the tree's existing nodes' info
*/
/* An activating merging origin won't have a node in the tree yet */
- if (((dinfo = _cached_info(dm->mem, dtree, lv, NULL)) &&
+ if (((dinfo = _cached_dm_info(dm->mem, dtree, lv, NULL)) &&
dinfo->open_count) ||
- ((dinfo = _cached_info(dm->mem, dtree,
- seg_is_thin_volume(seg) ?
- seg->lv : seg->cow, NULL)) &&
+ ((dinfo = _cached_dm_info(dm->mem, dtree,
+ seg_is_thin_volume(seg) ?
+ seg->lv : seg->cow, NULL)) &&
dinfo->open_count)) {
if (seg_is_thin_volume(seg) ||
/* FIXME Is there anything simpler to check for instead? */