mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
report: identify LV hodling sanlock locks as 'private,lockd,sanlock' within lv_role report field
Before this patch: $ lvs -a -o name,layout,role test/lvmlock LV Layout Role [lvmlock] linear public With this patch applied: $ lvs -a -o name,layout,role test/lvmlock LV Layout Role [lvmlock] linear private,lockd,sanlock
This commit is contained in:
parent
277dd0aa7a
commit
e04424e87e
@ -1,5 +1,6 @@
|
||||
Version 2.02.133 -
|
||||
======================================
|
||||
Properly identify internal LV holding sanlock locks within lv_role field.
|
||||
Add metadata_devices and seg_metadata_le_ranges report fields for raid vols.
|
||||
Fix lvm2-{activation,clvmd,cmirrord,monitor} service to exec before mounting.
|
||||
|
||||
|
@ -129,6 +129,8 @@ enum {
|
||||
LV_TYPE_RAID6_ZR,
|
||||
LV_TYPE_RAID6_NR,
|
||||
LV_TYPE_RAID6_NC,
|
||||
LV_TYPE_LOCKD,
|
||||
LV_TYPE_SANLOCK
|
||||
};
|
||||
|
||||
static const char *_lv_type_names[] = {
|
||||
@ -173,6 +175,8 @@ static const char *_lv_type_names[] = {
|
||||
[LV_TYPE_RAID6_ZR] = SEG_TYPE_NAME_RAID6_ZR,
|
||||
[LV_TYPE_RAID6_NR] = SEG_TYPE_NAME_RAID6_NR,
|
||||
[LV_TYPE_RAID6_NC] = SEG_TYPE_NAME_RAID6_NC,
|
||||
[LV_TYPE_LOCKD] = "lockd",
|
||||
[LV_TYPE_SANLOCK] = "sanlock",
|
||||
};
|
||||
|
||||
static int _lv_layout_and_role_mirror(struct dm_pool *mem,
|
||||
@ -505,6 +509,13 @@ int lv_layout_and_role(struct dm_pool *mem, const struct logical_volume *lv,
|
||||
if (!_lv_layout_and_role_thick_origin_snapshot(mem, lv, *layout, *role, &public_lv))
|
||||
goto_bad;
|
||||
|
||||
if (lv_is_lockd_sanlock_lv(lv)) {
|
||||
if (!str_list_add_no_dup_check(mem, *role, _lv_type_names[LV_TYPE_LOCKD]) ||
|
||||
!str_list_add_no_dup_check(mem, *role, _lv_type_names[LV_TYPE_SANLOCK]))
|
||||
goto_bad;
|
||||
public_lv = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* If layout not yet determined, it must be either
|
||||
* linear or striped or mixture of these two.
|
||||
|
Loading…
Reference in New Issue
Block a user