]> sourceware.org Git - lvm2.git/commitdiff
toollib: support new command rules queries
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 2 Jul 2018 08:50:41 +0000 (10:50 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 9 Jul 2018 13:28:35 +0000 (15:28 +0200)
Add: LV_vdo, LV_vdopool, LV_vdopooldata

tools/lv_types.h
tools/toollib.c

index bd4666ed4d29b0f09e139380563910964111e740..494776b814ee7af51b973a562126ad41982e347b 100644 (file)
@@ -20,6 +20,9 @@ lvt(thin_LVT, "thin", NULL)
 lvt(thinpool_LVT, "thinpool", NULL)
 lvt(cache_LVT, "cache", NULL)
 lvt(cachepool_LVT, "cachepool", NULL)
+lvt(vdo_LVT, "vdo", NULL)
+lvt(vdopool_LVT, "vdopool", NULL)
+lvt(vdopooldata_LVT, "vdopooldata", NULL)
 lvt(mirror_LVT, "mirror", NULL)
 lvt(raid_LVT, "raid", NULL) /* any raid type */
 lvt(raid0_LVT, "raid0", NULL)
index f0cf78e52c64f4851723ad440dda2e4542052fe3..62e1ecfd370dcc2800b0472ef882de9ea166ea72 100644 (file)
@@ -2544,6 +2544,12 @@ static int _lv_is_type(struct cmd_context *cmd, struct logical_volume *lv, int l
                return lv_is_cache(lv);
        case cachepool_LVT:
                return lv_is_cache_pool(lv);
+       case vdo_LVT:
+               return lv_is_vdo(lv);
+       case vdopool_LVT:
+               return lv_is_vdo_pool(lv);
+       case vdopooldata_LVT:
+               return lv_is_vdo_pool_data(lv);
        case mirror_LVT:
                return lv_is_mirror(lv);
        case raid_LVT:
@@ -2594,6 +2600,12 @@ int get_lvt_enum(struct logical_volume *lv)
                return cache_LVT;
        if (lv_is_cache_pool(lv))
                return cachepool_LVT;
+       if (lv_is_vdo(lv))
+               return vdo_LVT;
+       if (lv_is_vdo_pool(lv))
+               return vdopool_LVT;
+       if (lv_is_vdo_pool_data(lv))
+               return vdopooldata_LVT;
        if (lv_is_mirror(lv))
                return mirror_LVT;
        if (lv_is_raid(lv))
This page took 0.038391 seconds and 5 git commands to generate.