1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: rename to use track_ prefix

Since we use 'track_' prefix for other deps tracking,
convert skip_external_lv to use same logical meaning.
(just converts  1->0  0->1)
This commit is contained in:
Zdenek Kabelac 2017-02-04 15:02:34 +01:00
parent dae4f53acb
commit fb3f4ed72d

View File

@ -61,7 +61,7 @@ struct dev_manager {
int flush_required;
int activation; /* building activation tree */
int suspend; /* building suspend tree */
int skip_external_lv;
unsigned track_external_lv_deps;
struct dm_list pending_delete; /* str_list of dlid(s) with pending delete */
unsigned track_pending_delete;
unsigned track_pvmove_deps;
@ -2039,16 +2039,16 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
#endif
}
if (origin_only && dm->activation && !dm->skip_external_lv &&
if (origin_only && dm->activation && dm->track_external_lv_deps &&
lv_is_external_origin(lv)) {
/* Find possible users of external origin lv */
dm->skip_external_lv = 1; /* avoid recursion */
dm->track_external_lv_deps = 0; /* avoid recursion */
dm_list_iterate_items(sl, &lv->segs_using_this_lv)
/* Match only external_lv users */
if ((sl->seg->external_lv == lv) &&
!_add_lv_to_dtree(dm, dtree, sl->seg->lv, 1))
return_0;
dm->skip_external_lv = 0;
dm->track_external_lv_deps = 1;
}
if (lv_is_thin_pool(lv)) {
@ -2148,7 +2148,7 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
/* Add any LVs used by segments in this LV */
dm_list_iterate_items(seg, &lv->segments) {
if (seg->external_lv && !dm->skip_external_lv &&
if (seg->external_lv && dm->track_external_lv_deps &&
!_add_lv_to_dtree(dm, dtree, seg->external_lv, 1)) /* stack */
return_0;
if (seg->log_lv &&
@ -2158,7 +2158,7 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
!_add_lv_to_dtree(dm, dtree, seg->metadata_lv, 0))
return_0;
if (seg->pool_lv &&
(lv_is_cache_pool(seg->pool_lv) || !dm->skip_external_lv) &&
(lv_is_cache_pool(seg->pool_lv) || dm->track_external_lv_deps) &&
/* When activating and not origin_only detect linear 'overlay' over pool */
!_add_lv_to_dtree(dm, dtree, seg->pool_lv, dm->activation ? origin_only : 1))
return_0;
@ -2575,7 +2575,7 @@ static int _add_new_external_lv_to_dtree(struct dev_manager *dm,
struct seg_list *sl;
/* Do not want to recursively add externals again */
if (dm->skip_external_lv)
if (!dm->track_external_lv_deps)
return 1;
/*
@ -2583,7 +2583,7 @@ static int _add_new_external_lv_to_dtree(struct dev_manager *dm,
* process all LVs related to this LV, and we want to
* skip repeated invocation of external lv processing
*/
dm->skip_external_lv = 1;
dm->track_external_lv_deps = 0;
log_debug_activation("Adding external origin LV %s and all active users.",
display_lvname(external_lv));
@ -2609,7 +2609,7 @@ static int _add_new_external_lv_to_dtree(struct dev_manager *dm,
log_debug_activation("Finished adding external origin LV %s and all active users.",
display_lvname(external_lv));
dm->skip_external_lv = 0;
dm->track_external_lv_deps = 1;
return 1;
}
@ -3085,6 +3085,7 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv,
/* Some targets may build bigger tree for activation */
dm->activation = ((action == PRELOAD) || (action == ACTIVATE));
dm->suspend = (action == SUSPEND_WITH_LOCKFS) || (action == SUSPEND);
dm->track_external_lv_deps = 1;
if (!(dtree = _create_partial_dtree(dm, lv, laopts->origin_only)))
return_0;