{
struct dm_tree *dtree;
struct list *snh, *snht;
+ struct lv_segment *seg;
+ uint32_t s;
if (!(dtree = dm_tree_create())) {
log_error("Partial dtree creation failed for %s.", lv->name);
goto fail;
}
+ /* Add any LVs used by segments in this LV */
+ list_iterate_items(seg, &lv->segments)
+ for (s = 0; s < seg->area_count; s++)
+ if (seg_type(seg, s) == AREA_LV && seg_lv(seg, s)) {
+ if (!_add_lv_to_dtree(dm, dtree, seg_lv(seg, s))) {
+ stack;
+ goto fail;
+ }
+ }
+
return dtree;
fail:
goto_out;
/* Preload any devices required before any suspensions */
- if (!dm_tree_preload_children(root, dlid, ID_LEN + sizeof(UUID_PREFIX) - 1, (lv->status & LOCKED) ? 0 : 1))
+ if (!dm_tree_preload_children(root, dlid, ID_LEN + sizeof(UUID_PREFIX) - 1))
goto_out;
if ((action == ACTIVATE) &&
int dev_manager_preload(struct dev_manager *dm, struct logical_volume *lv)
{
+ /* FIXME Update the pvmove implementation! */
+ if ((lv->status & PVMOVE) || (lv->status & LOCKED))
+ return 1;
+
return _tree_action(dm, lv, PRELOAD);
}