From: Alasdair Kergon Date: Fri, 26 Aug 2011 18:15:14 +0000 (+0000) Subject: seg_is_thin includes both thin_pool and thin_volume X-Git-Tag: v2_02_91~633 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=6fbf1c6b56bb241eeee54566e266bb4219b52607;p=lvm2.git seg_is_thin includes both thin_pool and thin_volume --- diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h index 7ce111bdb..28613b158 100644 --- a/lib/metadata/segtype.h +++ b/lib/metadata/segtype.h @@ -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) diff --git a/lib/thin/thin.c b/lib/thin/thin.c index 6639bdcec..0bc7c1321 100644 --- a/lib/thin/thin.c +++ b/lib/thin/thin.c @@ -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;