mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
vgchange: vdo support
Support vgchange usage with VDO segtype. Also changing extent size need small update for vdo virtual extent. TODO: API needs enhancements so it's not about adding ifs() everywhere.
This commit is contained in:
parent
7b8aa4af57
commit
12213445b5
@ -504,6 +504,11 @@ int vg_set_extent_size(struct volume_group *vg, uint32_t new_extent_size)
|
|||||||
new_extent_size))
|
new_extent_size))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
|
if (!_recalc_extents(&seg->vdo_pool_virtual_extents, lv->name,
|
||||||
|
" virtual extents", old_extent_size,
|
||||||
|
new_extent_size))
|
||||||
|
return_0;
|
||||||
|
|
||||||
/* foreach area */
|
/* foreach area */
|
||||||
for (s = 0; s < seg->area_count; s++) {
|
for (s = 0; s < seg->area_count; s++) {
|
||||||
switch (seg_type(seg, s)) {
|
switch (seg_type(seg, s)) {
|
||||||
|
@ -107,6 +107,9 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
if (lv_is_mirror_image(lv) || lv_is_mirror_log(lv))
|
if (lv_is_mirror_image(lv) || lv_is_mirror_log(lv))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (lv_is_vdo_pool(lv))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (lv_activation_skip(lv, activate, arg_is_set(cmd, ignoreactivationskip_ARG)))
|
if (lv_activation_skip(lv, activate, arg_is_set(cmd, ignoreactivationskip_ARG)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -219,7 +222,9 @@ int vgchange_activate(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
|
|
||||||
if ((lv_open = lvs_in_vg_opened(vg))) {
|
if ((lv_open = lvs_in_vg_opened(vg))) {
|
||||||
dm_list_iterate_items(lvl, &vg->lvs) {
|
dm_list_iterate_items(lvl, &vg->lvs) {
|
||||||
if (lv_is_visible(lvl->lv) && !lv_check_not_in_use(lvl->lv, 1)) {
|
if (lv_is_visible(lvl->lv) &&
|
||||||
|
!lv_is_vdo_pool(lvl->lv) && // FIXME: API skip flag missing
|
||||||
|
!lv_check_not_in_use(lvl->lv, 1)) {
|
||||||
log_error("Can't deactivate volume group \"%s\" with %d open logical volume(s)",
|
log_error("Can't deactivate volume group \"%s\" with %d open logical volume(s)",
|
||||||
vg->name, lv_open);
|
vg->name, lv_open);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user