1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib
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
..
activate mirror_percent: support interruptible check 2021-04-06 22:02:31 +02:00
cache lvmcache: fix memory leak 2021-04-23 22:54:41 +02:00
cache_segtype cachevol: move flag setting after taking archive 2019-10-17 13:03:50 +02:00
commands devices file: recommend removing filter 2021-05-05 13:59:42 -05:00
config config: improve description for event_activation 2021-04-19 13:29:17 -05:00
datastruct cleanup: eliminate unused assign 2021-03-11 00:18:01 +01:00
device blkid: simplify fs block size check 2021-05-05 16:15:10 -05:00
display lib: locking: Add new type "idm" 2021-05-20 16:01:05 -05:00
error device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
filters devices file: recommend removing filter 2021-05-05 13:59:42 -05:00
format_text cov: use correct enum type 2021-04-23 23:00:55 +02:00
freeseg device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
integrity cleanup: no backtraces needed after log_error 2021-03-10 01:11:52 +01:00
label label_read_pvid: separate error and no-pvid 2021-04-23 17:37:08 -05:00
locking lib: locking: Parse PV list for IDM locking 2021-05-20 16:01:05 -05:00
log debug: keep microseconds aligned 2021-03-15 11:13:24 +01:00
lvmpolld device usage based on devices file 2021-02-23 16:43:32 -06:00
metadata lib: locking: Add new type "idm" 2021-05-20 16:01:05 -05:00
mirror lv_info: missing check for info.exists 2021-03-14 16:34:38 +01:00
misc lib: remove unused macros 2021-04-06 22:02:31 +02:00
mm cov: initialize value 2021-03-11 00:18:01 +01:00
notify build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
properties build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
raid cleanup: reduce code dupliction 2021-03-19 23:21:18 +01:00
report Add metadata-based autoactivation property for VG and LV 2021-04-07 15:32:49 -05:00
snapshot typo: fixes 2021-02-08 23:53:41 +01:00
striped device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
thin targets: use target_present_version 2021-02-08 23:43:38 +01:00
unknown device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
uuid build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
vdo vdo: just one probe is enough 2021-02-17 11:21:35 +01:00
writecache typo: fixes 2021-02-08 23:53:41 +01:00
zero device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
Makefile.in make: cflow target works again 2021-03-20 00:05:01 +01:00