Skip to content

Add lvm2app functions to lookup an lv or pv handle

Dave Wysochanski lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Add lvm2app helper functions to lookup an lv and pv handle by name.liblvm/lvm2app.h liblvm/lvm_lv.c liblvm/lvm_pv.c+57 -00 replies
2/3Add lvm2app helper functions to lookup an lv and pv handle by uuid.liblvm/lvm2app.h liblvm/lvm_lv.c liblvm/lvm_pv.c+82 -00 replies
3/3Add interactive tests for functions to lookup a pv|lv by name|uuid.test/api/test.c+95 -120 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/03] Add lvm2app functions to lookup an lv or pv handle

This patchset implements helper functions to lookup an lv or pv handle from vg handle and the pv|lv name or uuid.

Until now, users of lvm2app that wished to obtain an LV or PV handle from an existing VG must do so by the following sequence:
1) Call lvm_vg_open() to open an existing VG
2) Call lvm_vg_list_{pvs|lvs}() to list all PVs or LVs
3) Find the PV or LV of interest by comparing uuids or names

The above method is awkward for callers of the API that wish to operate on a single LV or PV. This patchset should make it easier for callers to do operations on a single LV or PV.