mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-02 04:22:02 +03:00
report: add separate fields for PV/VG/LV attributes
Physical Volume Fields: pv_allocatable - Whether this device can be used for allocation. pv_exported - Whether this device is exported. pv_missing - Whether this device is missing in system. Volume Group Fields: vg_permissions - VG permissions. vg_extendable - Whether VG is extendable. vg_exported - Whether VG is exported. vg_partial - Whether VG is partial. vg_allocation_policy - VG allocation policy. vg_clustered - Whether VG is clustered. Logical Volume Fields: lv_volume_type - LV volume type. lv_initial_image_sync - Whether mirror/RAID images underwent initial resynchronization. lv_image_synced - Whether mirror/RAID image is synchronized. lv_merging - Whether snapshot LV is being merged to origin. lv_converting - Whether LV is being converted. lv_allocation_policy - LV allocation policy. lv_allocation_locked - Whether LV is locked against allocation changes. lv_fixed_minor - Whether LV has fixed minor number assigned. lv_merge_failed - Whether snapshot merge failed. lv_snapshot_invalid - Whether snapshot LV is invalid. lv_target_type - Kernel target type the LV is related to. lv_health_status - LV health status. lv_skip_activation - Whether LV is skipped on activation. Logical Volume Info Fields lv_permissions - LV permissions. lv_suspended - Whether LV is suspended. lv_live_table - Whether LV has live table present. lv_inactive_table - Whether LV has inactive table present. lv_device_open - Whether LV device is open.
This commit is contained in:
@ -122,12 +122,13 @@ static int _ ## NAME ## _get (const void *obj, struct lvm_property_type *prop) \
|
||||
|
||||
#define STR 1
|
||||
#define NUM 2
|
||||
#define SIZ 3
|
||||
#define PCT 4
|
||||
#define STR_LIST 5
|
||||
#define BIN 3
|
||||
#define SIZ 4
|
||||
#define PCT 5
|
||||
#define STR_LIST 6
|
||||
|
||||
#define FIELD_MODIFIABLE 0x00000001
|
||||
#define FIELD(type, strct, field_type, head, field, width, fn, id, desc, settable) \
|
||||
{ type, #id, settable, field_type == STR, ((field_type == NUM) || (field_type == SIZ) || (field_type == PCT)), { .integer = 0 }, _ ## id ## _get, _ ## id ## _set },
|
||||
{ type, #id, settable, field_type == STR, ((field_type == NUM) || (field_type == BIN) || (field_type == SIZ) || (field_type == PCT)), { .integer = 0 }, _ ## id ## _get, _ ## id ## _set },
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user