mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
segtype: add missing macros for error and zero segment
Add macros for checking error and zero segment as we do with other segtypes.
This commit is contained in:
parent
5154054af4
commit
d43a79eec9
@ -277,6 +277,9 @@
|
||||
|
||||
#define lv_is_removed(lv) (((lv)->status & LV_REMOVED) ? 1 : 0)
|
||||
|
||||
#define lv_is_zero(lv) ((dm_list_size(&lv->segments) == 1) && seg_is_zero(first_seg(lv)))
|
||||
#define lv_is_error(lv) ((dm_list_size(&lv->segments) == 1) && seg_is_error(first_seg(lv)))
|
||||
|
||||
/* Recognize component LV (matching lib/misc/lvm-string.c _lvname_has_reserved_component_string()) */
|
||||
#define lv_is_component(lv) (lv_is_cache_origin(lv) || \
|
||||
lv_is_writecache_origin(lv) || \
|
||||
|
@ -221,6 +221,8 @@ struct dev_manager;
|
||||
#define seg_is_vdo(seg) segtype_is_vdo((seg)->segtype)
|
||||
#define seg_is_vdo_pool(seg) segtype_is_vdo_pool((seg)->segtype)
|
||||
#define seg_is_virtual(seg) segtype_is_virtual((seg)->segtype)
|
||||
#define seg_is_error(seg) segtype_is_error((seg)->segtype)
|
||||
#define seg_is_zero(seg) segtype_is_zero((seg)->segtype)
|
||||
#define seg_unknown(seg) segtype_is_unknown((seg)->segtype)
|
||||
#define seg_can_split(seg) segtype_can_split((seg)->segtype)
|
||||
#define seg_cannot_be_zeroed(seg) segtype_cannot_be_zeroed((seg)->segtype)
|
||||
|
Loading…
Reference in New Issue
Block a user