1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

seg_is_thin includes both thin_pool and thin_volume

This commit is contained in:
Alasdair Kergon 2011-08-26 18:15:14 +00:00
parent 42914557d5
commit 6fbf1c6b56
2 changed files with 5 additions and 4 deletions

View 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)

View 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;