mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: more lv_is_ functions
This commit is contained in:
parent
6da14a82c6
commit
2ada685216
@ -163,17 +163,21 @@
|
|||||||
#define vg_is_archived(vg) (((vg)->status & ARCHIVED_VG) ? 1 : 0)
|
#define vg_is_archived(vg) (((vg)->status & ARCHIVED_VG) ? 1 : 0)
|
||||||
|
|
||||||
#define lv_is_external_origin(lv) (((lv)->external_count > 0) ? 1 : 0)
|
#define lv_is_external_origin(lv) (((lv)->external_count > 0) ? 1 : 0)
|
||||||
#define lv_is_thin_volume(lv) ((lv)->status & THIN_VOLUME ? 1 : 0)
|
#define lv_is_thin_volume(lv) (((lv)->status & (THIN_VOLUME)) ? 1 : 0)
|
||||||
#define lv_is_thin_pool(lv) ((lv)->status & THIN_POOL ? 1 : 0)
|
#define lv_is_thin_pool(lv) (((lv)->status & (THIN_POOL)) ? 1 : 0)
|
||||||
#define lv_is_used_thin_pool(lv) (lv_is_thin_pool(lv) && !dm_list_empty(&(lv)->segs_using_this_lv))
|
#define lv_is_used_thin_pool(lv) (lv_is_thin_pool(lv) && !dm_list_empty(&(lv)->segs_using_this_lv))
|
||||||
#define lv_is_thin_pool_data(lv) ((lv)->status & THIN_POOL_DATA ? 1 : 0)
|
#define lv_is_thin_pool_data(lv) (((lv)->status & (THIN_POOL_DATA)) ? 1 : 0)
|
||||||
#define lv_is_thin_pool_metadata(lv) ((lv)->status & THIN_POOL_METADATA ? 1 : 0)
|
#define lv_is_thin_pool_metadata(lv) (((lv)->status & (THIN_POOL_METADATA)) ? 1 : 0)
|
||||||
#define lv_is_mirrored(lv) ((lv)->status & MIRRORED ? 1 : 0)
|
#define lv_is_mirrored(lv) (((lv)->status & (MIRRORED)) ? 1 : 0)
|
||||||
#define lv_is_rlog(lv) ((lv)->status & REPLICATOR_LOG ? 1 : 0)
|
#define lv_is_rlog(lv) (((lv)->status & (REPLICATOR_LOG)) ? 1 : 0)
|
||||||
|
|
||||||
#define lv_is_thin_type(lv) ((lv)->status & (THIN_POOL | THIN_VOLUME | THIN_POOL_DATA | THIN_POOL_METADATA) ? 1 : 0)
|
#define lv_is_thin_type(lv) (((lv)->status & (THIN_POOL | THIN_VOLUME | THIN_POOL_DATA | THIN_POOL_METADATA)) ? 1 : 0)
|
||||||
#define lv_is_mirror_type(lv) ((lv)->status & (MIRROR_LOG | MIRROR_IMAGE | MIRRORED | PVMOVE) ? 1 : 0)
|
#define lv_is_mirror_type(lv) (((lv)->status & (MIRROR_LOG | MIRROR_IMAGE | MIRRORED | PVMOVE)) ? 1 : 0)
|
||||||
|
#define lv_is_mirror_image(lv) (((lv)->status & (MIRROR_IMAGE)) ? 1 : 0)
|
||||||
|
#define lv_is_mirror_log(lv) (((lv)->status & (MIRROR_LOG)) ? 1 : 0)
|
||||||
#define lv_is_raid(lv) (((lv)->status & (RAID)) ? 1 : 0)
|
#define lv_is_raid(lv) (((lv)->status & (RAID)) ? 1 : 0)
|
||||||
|
#define lv_is_raid_image(lv) (((lv)->status & (RAID_IMAGE)) ? 1 : 0)
|
||||||
|
#define lv_is_raid_metadata(lv) (((lv)->status & (RAID_META)) ? 1 : 0)
|
||||||
#define lv_is_raid_type(lv) (((lv)->status & (RAID | RAID_IMAGE | RAID_META)) ? 1 : 0)
|
#define lv_is_raid_type(lv) (((lv)->status & (RAID | RAID_IMAGE | RAID_META)) ? 1 : 0)
|
||||||
|
|
||||||
#define lv_is_cache(lv) (((lv)->status & (CACHE)) ? 1 : 0)
|
#define lv_is_cache(lv) (((lv)->status & (CACHE)) ? 1 : 0)
|
||||||
@ -182,8 +186,8 @@
|
|||||||
#define lv_is_cache_pool_metadata(lv) (((lv)->status & (CACHE_POOL_METADATA)) ? 1 : 0)
|
#define lv_is_cache_pool_metadata(lv) (((lv)->status & (CACHE_POOL_METADATA)) ? 1 : 0)
|
||||||
#define lv_is_cache_type(lv) (((lv)->status & (CACHE | CACHE_POOL | CACHE_POOL_DATA | CACHE_POOL_METADATA)) ? 1 : 0)
|
#define lv_is_cache_type(lv) (((lv)->status & (CACHE | CACHE_POOL | CACHE_POOL_DATA | CACHE_POOL_METADATA)) ? 1 : 0)
|
||||||
|
|
||||||
#define lv_is_virtual(lv) (((lv)->status & VIRTUAL) ? 1 : 0)
|
#define lv_is_virtual(lv) (((lv)->status & (VIRTUAL)) ? 1 : 0)
|
||||||
#define lv_is_pool_metadata_spare(lv) (((lv)->status & POOL_METADATA_SPARE) ? 1 : 0)
|
#define lv_is_pool_metadata_spare(lv) (((lv)->status & (POOL_METADATA_SPARE)) ? 1 : 0)
|
||||||
|
|
||||||
/* Ordered list - see lv_manip.c */
|
/* Ordered list - see lv_manip.c */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
Loading…
Reference in New Issue
Block a user