1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/locking
Leo Yan affe1af148 lib: locking: Parse PV list for IDM locking
For shared VG or LV locking, IDM locking scheme needs to use the PV
list assocated with VG or LV for sending SCSI commands, thus it requires
to use some places to generate PV list.

In reviewing the flow for LVM commands, the best place to generate PV
list is in the locking lib.  So this is why this patch parses PV list as
shown.  It iterates over all the PV nodes one by one, and compare with
the VG name or LV prefix string.  If any PV matches, then the PV is
added into the PV list.  Finally the PV list is sent to lvmlockd daemon.

Here as mentioned, it compares LV prefix string with the format
"lv_name_", the reason is it needs to find out all relevant PVs, e.g.
for the thin pool, it has LVs for metadata, pool, error, and raw LV, so
we can use the prefix string to find out all PVs belonging to the thin
pool.

For the global lock, it's not covered in this patch.  To avoid the egg
and chicken issue, we need to prepare the global lock ahead before any
locking can be used.  So the global lock's PV list is established in
lvmlockd daemon by iterating all drives with partition labeled with
"propeller".

Signed-off-by: Leo Yan <leo.yan@linaro.org>
2021-05-20 16:01:05 -05:00
..
.exported_symbols Pre-release cleanups. 2009-05-21 03:04:52 +00:00
file_locking.c locking: unify global lock for flock and lockd 2019-04-29 13:01:05 -05:00
locking_types.h Implement lock-override options without locking type 2018-06-07 16:17:04 +01:00
locking.c locking: restore blocking signal for VG_GLOBAL lck 2020-09-14 00:15:14 +02:00
locking.h pvcreate,pvremove: fix reacquiring global lock after prompt 2019-11-26 14:34:43 -06:00
lvmlockd.c lib: locking: Parse PV list for IDM locking 2021-05-20 16:01:05 -05:00
lvmlockd.h build: fix compilation without lvmlockd 2019-05-03 13:17:22 +02:00