Skip to content

: liblvm object property baseline, take2

Dave Wysochanski lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest30 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/30Define handles to liblvm objects for pv, vg, lv, lvseg, pvseg.lib/metadata/metadata-exported.h liblvm/lvm.h+16 -100 replies
2/30Add lvm_object_prop.pl to generate liblvm object property functions.lib/report/lvm_object_prop.pl+232 -00 replies
3/30Add generated files, lvm_object_prop.[ch], to lib/report directory and buildinclude/.symlinks lib/Makefile.in lib/report/lvm_object_prop.c +2 more+1447 -00 replies
4/30Update vg_size 'disp' function to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+3 -30 replies
5/30Modify lv_major and lv_minor fields to call liblvm 'get' functions.lib/report/columns.h lib/report/report.c+27 -90 replies
6/30Update lvreadahead_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+5 -40 replies
7/30Update lvkreadhead_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+9 -50 replies
8/30Update lv_size field - create lvsize_disp() and call liblvm 'get' function.lib/report/columns.h lib/report/report.c+13 -10 replies
9/30Update lvsegcount_disp() to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+2 -30 replies
10/30Update originsize_disp() to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+10 -80 replies
11/30Update devsize_disp() to call liblvm 'get' function.lib/report/columns.h lib/report/lvm_object_prop.c lib/report/report.c+9 -60 replies
12/30Update pvmdafree_disp() to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+23 -170 replies
13/30Update pvmdasize_disp and vgmdasize_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+33 -300 replies
14/30Update pe_start field - create pestart_disp which calls liblvm 'get' function.lib/report/columns.h lib/report/report.c+14 -10 replies
15/30Update pvsize_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+8 -60 replies
16/30Update pvfree_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+9 -60 replies
17/30Update pvused_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+8 -60 replies
18/30Update pv_pe_count and pv_pe_alloc_count fields to call liblvm 'get' functions.lib/report/columns.h lib/report/report.c+28 -20 replies
19/30Update pvmdas_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+9 -60 replies
20/30Update vgfree_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+2 -30 replies
21/30Update a few simple vg 'NUM' fields to call liblvm 'get' functions.lib/report/columns.h lib/report/report.c+85 -130 replies
22/30Update lvcount_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+2 -30 replies
23/30Update vg_snap_count and vg_seqno display functions to call liblvm 'get'.lib/report/columns.h lib/report/report.c+26 -20 replies
24/30Update vgmdas_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+2 -30 replies
25/30Update vgmdafree_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+16 -140 replies
26/30Update a few lvseg field display functions to call liblvm 'get' functions.lib/report/columns.h lib/report/report.c+41 -50 replies
27/30Update chunksize_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+7 -60 replies
28/30Update segstart_disp and segstartpe_disp to call liblvm 'get' functions.lib/report/lvm_object_prop.c lib/report/report.c+7 -60 replies
29/30Update segsize_disp to call liblvm 'get' function.lib/report/lvm_object_prop.c lib/report/report.c+2 -30 replies
30/30Update pvseg_start and pvseg_size fields to have a disp function calling liblvmlib/report/columns.h lib/report/report.c+26 -20 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/30]: liblvm object property baseline, take2

The following 30 patches supercede the previous 8 patch posting and implement a baseline for liblvm objects and their properties. The primary focus/goal of these patches are:
1. Define / clarify the main liblvm objects and their handles
2. Get the numeric object properties for a specific handle
3. Convert reporting commands to call liblvm 'get' functions for 'NUM' fields

Together with the handles, the 'get' functions will provide equivalent functionality to the reporting commands (pvs, vgs, lvs) while keeping with the object model of liblvm.

This set of patches converts most all numeric reporting field 'disp' functions to call into liblvm 'get' property functions. There should be no functional change after this patch, and I believe this patchset, while lengthy, should be relatively easy to review.

The bulk of this patchset involves a couple changes for each field:
1) moves the logic of the field data calculation from the 'disp' function into liblvm 'get' function
2) adds a 'disp' function for fields with simple dereferences (these were originally covered by the same 'disp' function (for example, _uint32_disp())

There are a few areas of particular interest in this patchset. First, the return types for all the 'get' functions are the same at uint64_t. This would allow internal changes to field sizes without making them visible in the API but also obscures the internal type size. I could easily make the internal size match the return type of the 'get' function if this is deemed the better tradeoff, but I thought fixed uint64_t was decided in a previous discussion. Second, a couple numeric fields were ommitted from this patch: snap_percent, and copy_percent. These fields involve a float value and so will be dealt with in a later patchset.

Along with this patchset I've been adding nightly tests to cover some of the numeric reporting fields not yet covered. We are still missing a few fields in the nightly tests and some deserve better coverage but we are getting closer to full coverage.

This set of patches pass the nightly test suite.
They apply cleanly against the following commit:
commit 97e41de23f5a021dfba8fb16692a9e2badec7d56

Author: Milan Broz <[email protected]>
Date:   Mon May 11 10:35:00 2009 +0000

Fix previous commit (scripts/Makefile targets order)