[lvm-devel] [PATCH 07/11] Add implementation for vg_mda_*_get functions.

Alasdair G Kergon agk at redhat.com
Thu Aug 19 15:02:55 UTC 2010


On Wed, Aug 18, 2010 at 09:51:58AM -0400, Dave Wysochanski wrote:
> Add 'get' function implementation for vg_mda_count, vg_mda_used_count,
> vg_mda_free, vg_mda_size.  These are read-only properties so the 'set'
> functions are defined to the _not_implemented function.

They look rather similar to each other:)
You might be able to generate some of them from a template.

#define GET_SIMPLE_VG_PROPERTY_FN(...) ...
 
GET_SIMPLE_PROPERTY_FN(vg_mda_free, vg_mda_free(vg))
GET_SIMPLE_PROPERTY_FN(vg_mda_size, SECTOR_SIZE * vg_mda_size(vg))

Alasdair




More information about the lvm-devel mailing list