RFC dm_report attribute handling and liblvm vg attributes
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest12 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | Add dm_report_output_attributes() API to dm_report framework.libdm/ libdm/ libdm/ | +113 | 0 replies | |
| 2/12 | Add system_dir to create_toolcontext().daemons/ lib/ lib/ +1 more | +8 | 0 replies | |
| 3/12 | Add lvm_create, lvm_destroy, lvm_reload_config() APIs.lib/ lib/ lib/ +1 more | +98 | 0 replies | |
| 4/12 | Move vg_t, lv_t, and pv_t from metadata-exported.h into lvm2.hlib/ lib/ | +10 | 1 reply | |
| 5/12 | Add lvm_pv_name, lvm_vg_name, and lvm_lv_name accessors.lib/ lib/ | +22 | 1 reply | |
| 6/12 | Add lvm_vg_open().lib/ lib/ | +16 | 0 replies | |
| 7/12 | Add lvm_vg_close().lib/ lib/ | +12 | 0 replies | |
| 8/12 | Add lvm_errno(), lvm_strerror, lvm_vg_mode.lib/ lib/ lib/ +1 more | +100 | 2 replies | |
| 9/12 | Update lvm_vg_open() to read and store the list of vg attributes.lib/ lib/ | +47 | 0 replies | |
| 10/12 | Add lvm_vg_get_attr_list() and lvm_vg_get_attr().lib/ lib/ | +37 | 0 replies | |
| 11/12 | Add lvm_vgname_from_vgid() and lvm_get_vgids()lib/ lib/ | +16 | 0 replies | |
| 12/12 | Add test code.test/ | +235 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/12] dm_report attribute handling and liblvm vg attributes
The purpose of this patchset is to get feedback on one approach to handling attributes in liblvm. The most important patches are:
1/12: Adds dm_report_output_attribute() function and related structures. 9/12: Updates vg_open to store vg attributes in the handle. This allows us to use the report memory safely (we free it in vg_close(). 10/12: Add lvm_vg_get_attr_list() and lvm_vg_get_attr().
What is missing in the patch is the mode (read/write) of the attribute. I have not thought extensively about this but one option is as follows. Add a 'mode' or 'is_writable' field to the dm structure, and set it to 'readonly' for all attributes output by dm_report_output_attribute(). Then in vg_open(), depending on the mode and capabilities of the current release of liblvm code, we can gradually change various attributes to writeable.
This patchset should build fine but with some warnings. Attribute code was exercised with test code in last patch.