Skip to content

Add infrastructure for cleaner pv handling, v7

Dave Wysochanski lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Add pvid_from_devname() lvmcache function.lib/cache/lvmcache.c lib/cache/lvmcache.h+21 -00 replies
2/6Add lvmcache function to lookup a vgname from a pvid.lib/cache/lvmcache.c lib/cache/lvmcache.h+26 -00 replies
3/6Add find_vgname_from_{pvname|pvid} functions.lib/metadata/metadata-exported.h lib/metadata/metadata.c+50 -00 replies
4/6Update pvchange to always obtain a vg handle for each pv to process.tools/pvchange.c+55 -670 replies
5/6Add lvm2app interfaces to lookup a vgname from a pvid and pvname.VERSION liblvm/.exported_symbols liblvm/lvm2app.h +1 more+62 -20 replies
6/6Test lvm_vgname_from_{pvid|device}.test/api/test.c+40 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] Add infrastructure for cleaner pv handling, v7

This patchset replaces the last patchset submitted on Wed, 28 Apr 2010 11:55:37.

Quoted 1 line

From now on, a user that wants to get/set a PV property and

knows only the pvname must first lookup the vgname, then obtain a vg handle, and finally use the pv handle to get/set the property.

Early patches add internal functions to lookup a vgname from a device name and pvid, respecting the order of lookup. In cases where we lookup by pvid or there are no mdas, we may need to do increasingly expensive scans to provide the answer. Once the internal functions are given, pvchange is reworked to use this new functionality, and lvm2app interfaces are added to lookup a vgname from a pvname and pvid, which will be useful for udisks and other applications that may not know the vgname but want information on a specific device/PV. The new functionality is tested by running the nightly tests and some lvm2app specific tests.