Add infrastructure for cleaner pv handling, v2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | Add a couple of lvmcache functions to aid in lookups by pvname.lib/ lib/ | +43 | 0 replies | |
| 2/3 | Add find_vgname_from_pvname() function using lvmcache functions.lib/ lib/ | +43 | 0 replies | |
| 2/3 | Add find_vgname_from_pvname() function using lvmcache functions. | +0 | 0 replies | |
| 3/3 | Update pvchange to always obtain a vg handle for each pv to process.tools/ | +46 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] Add infrastructure for cleaner pv handling, v2
This is the second version of the patchset that adds infrastructure to move us more towards the goal of removing the standalone PV object.
Quoted 1 line
From now on, a get/set of a PV property from the pvname requires
a lookup of the vgname, then a vg handle from the vgname, a pv from the vg handle, and finally using the pv handle to get/set the property.
The last patch reworks pvchange to use this new functionality. It passes the testsuite but does have at least one bug. A setup with a VG containing a PV with metadatacopies == 0 and pvchange -u --all end up failing because the PV is on both the orphan VG and the real VG. I tried a few ways of working around this, including processing the non-orphan VGs first, but I believe the root problem lies in the vg locking and lvmcache. The lvmcache gets invalidated after each vg lock change, so even if a PV with metadata copies was known to be in a real VG, once that lock is dropped the cache is invalidated and the PV shows up in the vg->pvs list for the orphan VG.