]> sourceware.org Git - lvm2.git/commitdiff
seg_is_thin includes both thin_pool and thin_volume
authorAlasdair Kergon <agk@redhat.com>
Fri, 26 Aug 2011 18:15:14 +0000 (18:15 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 26 Aug 2011 18:15:14 +0000 (18:15 +0000)
lib/metadata/segtype.h
lib/thin/thin.c

index 7ce111bdb728dc9e492bb1b8074bc5fb0f69a654..28613b1583f0518fe374e80153bef7b5c7734489 100644 (file)
@@ -39,8 +39,8 @@ struct dev_manager;
 #define SEG_REPLICATOR         0x00000100U
 #define SEG_REPLICATOR_DEV     0x00000200U
 #define SEG_RAID               0x00000400U
-#define SEG_THIN               0x00000800U
-#define SEG_THIN_POOL          0x00001000U
+#define SEG_THIN_POOL          0x00000800U
+#define SEG_THIN_VOLUME                0x00001000U
 #define SEG_UNKNOWN            0x80000000U
 
 #define seg_is_mirrored(seg)   ((seg)->segtype->flags & SEG_AREAS_MIRRORED ? 1 : 0)
@@ -50,8 +50,9 @@ struct dev_manager;
 #define seg_is_snapshot(seg)   ((seg)->segtype->flags & SEG_SNAPSHOT ? 1 : 0)
 #define seg_is_virtual(seg)    ((seg)->segtype->flags & SEG_VIRTUAL ? 1 : 0)
 #define seg_is_raid(seg)       ((seg)->segtype->flags & SEG_RAID ? 1 : 0)
-#define seg_is_thin(seg)       ((seg)->segtype->flags & SEG_THIN ? 1 : 0)
+#define seg_is_thin(seg)       ((seg)->segtype->flags & (SEG_THIN_POOL|SEG_THIN_VOLUME) ? 1 : 0)
 #define seg_is_thin_pool(seg)  ((seg)->segtype->flags & SEG_THIN_POOL ? 1 : 0)
+#define seg_is_thin_volume(seg)        ((seg)->segtype->flags & SEG_THIN_VOLUME ? 1 : 0)
 #define seg_can_split(seg)     ((seg)->segtype->flags & SEG_CAN_SPLIT ? 1 : 0)
 #define seg_cannot_be_zeroed(seg) ((seg)->segtype->flags & SEG_CANNOT_BE_ZEROED ? 1 : 0)
 #define seg_monitored(seg)     ((seg)->segtype->flags & SEG_MONITORED ? 1 : 0)
index 6639bdcecb22387160ca9a30d9b94b915f49700b..0bc7c132100c4909f901ec21aec417d9eb63364b 100644 (file)
@@ -208,7 +208,7 @@ int init_multiple_segtypes(struct cmd_context *cmd, struct segtype_library *segl
                uint32_t flags;
        } reg_segtypes[] = {
                { &_thin_pool_ops, "thin_pool", SEG_THIN_POOL },
-               { &_thin_ops, "thin", SEG_THIN }
+               { &_thin_ops, "thin", SEG_THIN_VOLUME }
        };
 
        struct segment_type *segtype;
This page took 0.035992 seconds and 5 git commands to generate.