diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2014-11-04 10:31:28 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2014-11-04 15:28:00 +0100 |
commit | 26aa912b4663633c6e094bad85393601903bcaac (patch) | |
tree | c6fa0c1d33a344e27b091e6f079ca26b58025ae7 | |
parent | 89233544e00a0acfad82055b737ebcce41919d58 (diff) | |
download | lvm2-26aa912b4663633c6e094bad85393601903bcaac.tar.gz |
thin: add lv_is_new_thin_pool
Recognize 'new' (and never used) lvm2 thin pool - it has 'transaction_id' == 0
(lv_is_used_thin_pool() has slightly different meaning).
-rw-r--r-- | lib/metadata/metadata-exported.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h index 736b0b56c..713b3b652 100644 --- a/lib/metadata/metadata-exported.h +++ b/lib/metadata/metadata-exported.h @@ -175,6 +175,7 @@ #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_new_thin_pool(lv) (lv_is_thin_pool(lv) && !first_seg(lv)->transaction_id) #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_metadata(lv) (((lv)->status & THIN_POOL_METADATA) ? 1 : 0) |