mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
affe1af148
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> |
||
---|---|---|
.. | ||
.exported_symbols | ||
file_locking.c | ||
locking_types.h | ||
locking.c | ||
locking.h | ||
lvmlockd.c | ||
lvmlockd.h |