Skip to content

Add lvm lv properties for lvm2app, return struct.

Dave Wysochanski lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Refactor and add code for (lv) 'lv_name' get function.lib/metadata/lv.c lib/metadata/lv.h lib/report/properties.c+7 -11 reply
2/8Refactor and add code for (lv) 'lv_origin' get function.lib/metadata/lv.c lib/metadata/lv.h lib/report/properties.c +1 more+12 -31 reply
2/8Refactor and add code for (lv) 'lv_origin' get function.+0 -00 replies
3/8Add lv_read_ahead and lv_kernel_read_ahead 'get' functions.lib/metadata/lv.c lib/metadata/lv.h lib/report/properties.c +1 more+15 -51 reply
4/8Rename fields in lvm_property_type.lib/report/properties.c lib/report/properties.h+11 -131 reply
5/8Add lvm_vg_get_property() generic vg property function.liblvm/lvm2app.h liblvm/lvm_misc.c liblvm/lvm_misc.h +1 more+103 -11 reply
5/8Add lvm_vg_get_property() generic vg property function.+0 -01 reply
5/8Add lvm_vg_get_property() generic vg property function.+0 -00 replies
6/8Add lvm_pv_get_property() generic function to obtain value of any pv property.liblvm/lvm2app.h liblvm/lvm_pv.c+44 -01 reply
7/8Add lvm_lv_get_property() generic function to obtain value of any lv property.lib/report/properties.c lib/report/properties.h liblvm/lvm2app.h +1 more+51 -01 reply
8/8Add interactive tests for lvm_{pv|vg|lv}_get_property().test/api/test.c+112 -01 reply

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchPetr Rockai
1/8R-b
2/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
5/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

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/08] Add lvm lv properties for lvm2app, return struct.

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

I agree it is a good approach and so am posting it for comparison with the previous approach and final decision.

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

Changes since last patchset:
1. Added readahead attributes (lv_read_ahead, lv_kernel_read_ahead)
2. Incorporated most all feedback comments, including renaming of the fields, etc. I did not change the 'get' function prototype to return the property value rather than passing it in.
3. Updated comments describing new APIs in lvm2app.h
4. Changed return value from 'int' to lvm_property_value based on Petr's suggestion. Added a 'is_valid' flag, which must be checked before using the value.
5. 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.