]> sourceware.org Git - lvm2.git/commitdiff
vgchange: vdo support
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 1 Jul 2018 10:03:23 +0000 (12:03 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 9 Jul 2018 13:29:16 +0000 (15:29 +0200)
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.

lib/metadata/vg.c
tools/vgchange.c

index 75a054f371891ec305177bdd4b2365ee23e959a7..20c2aeca9daeae04ca771516a6cfd5e8683b6853 100644 (file)
@@ -504,6 +504,11 @@ int vg_set_extent_size(struct volume_group *vg, uint32_t new_extent_size)
                                             new_extent_size))
                                return_0;
 
+                       if (!_recalc_extents(&seg->vdo_pool_virtual_extents, lv->name,
+                                            " virtual extents", old_extent_size,
+                                            new_extent_size))
+                               return_0;
+
                        /* foreach area */
                        for (s = 0; s < seg->area_count; s++) {
                                switch (seg_type(seg, s)) {
index c444c30264d49af1679193d1e996b05d9af9d792..fa0fd53656b2266a53cdceaa0cb52c18abbcdec0 100644 (file)
@@ -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))
                        continue;
 
+               if (lv_is_vdo_pool(lv))
+                       continue;
+
                if (lv_activation_skip(lv, activate, arg_is_set(cmd, ignoreactivationskip_ARG)))
                        continue;
 
@@ -219,7 +222,9 @@ int vgchange_activate(struct cmd_context *cmd, struct volume_group *vg,
 
                if ((lv_open = lvs_in_vg_opened(vg))) {
                        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)",
                                                  vg->name, lv_open);
                                        return 0;
This page took 0.040408 seconds and 5 git commands to generate.