Skip to content

Add generic property fns for lvm2app, return struct, v2.

Dave Wysochanski lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Add 'is_integer' flag into internal lvm_property_type.lib/report/properties.c lib/report/properties.h+3 -20 replies
2/5Add lvm_vg_get_property() generic vg property function.liblvm/lvm2app.h liblvm/lvm_misc.c liblvm/lvm_misc.h +1 more+106 -10 replies
3/5Add lvm_pv_get_property() generic function to obtain value of any pv property.liblvm/lvm2app.h liblvm/lvm_pv.c+44 -00 replies
4/5Add lvm_lv_get_property() generic function to obtain value of any lv propertliblvm/lvm2app.h liblvm/lvm_lv.c+43 -00 replies
5/5Add interactive tests for lvm_{pv|vg|lv}_get_property().test/api/test.c+112 -00 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPetr Rockai
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/05] Add generic property fns for lvm2app, return struct, v2.

This is the modified patchset based on Petr's suggestion of changing the return value from 'int' to struct lvm_property_value:
http://www.redhat.com/archives/lvm-devel/2010-October/msg00068.html

Returning the struct seems like the approach things are moving, but a few details probably still worth considering, especially the exact layout of the exported struct lvm_property_value (ABI implications). Final submission might be best left to Petr.

Patchset adds the lvm2app 'get' functions for vg, pv, and lv, and interactive tests to exercise the interface.

Changes since last patchset:
1. Added 'is_integer' bit/flag, similar to 'is_string'
2. Updated comments describing new APIs in lvm2app.h
3. Simplified the common code in lvm2app into a local 'get_property' function which allows for a single-line implementation of lvm_{pv|vg|lv}_get_property

The only two lv properties not included now are still the float/percent based properties, snap_percent and copy_percent. These should be refactored carefully and I did not want to delay these patches further.

All vg and pv properties and most lv properties may now be queried with this patchset.