Add vg/lv tag addition/deletion to lvm2app
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | Refactor _vgchange_tag() to vg_change_tag() library function.lib/ lib/ tools/ | +26 | 0 replies | |
| 2/7 | Refactor vgcreate to call new vg_change_tag() function.tools/ | +1 | 0 replies | |
| 3/7 | Refactor lvchange_tag() to call lv_change_tag() library function.lib/ lib/ tools/ | +27 | 0 replies | |
| 4/7 | Add _tag_copy() to allocate memory and copy a tag in {lv|vg}_change_tag()lib/ | +20 | 1 reply | |
| 5/7 | Add lvm_vg_get_tags(), lvm_vg_add_tag(), and lvm_vg_remove_tag().liblvm/ liblvm/ liblvm/ | +105 | 0 replies | |
| 6/7 | Add lvm_lv_get_tags(), lvm_lv_add_tag(), and lvm_lv_remove_tag().liblvm/ liblvm/ liblvm/ | +107 | 0 replies | |
| 7/7 | Update lvm2app interactive unit test for vg/lv tags.test/ | +99 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/7] Add vg/lv tag addition/deletion to lvm2app
This patchset adds lv/vg tag addition/deletion to lvm2app. pv tags will be handled later when the pv refactoring patches are done. Partially fixes rhbz 562909.
Patchset is fairly straightforward. When adding a tag, we need to copy the tag memory before adding it to the list (see patch #4). The copy could be placed inside lvm2app or in the internal library. I chose the internal library to minmize code in lvm2app. Another finer point is what to return when the 'get_tags' lvm2app function is called but there's no tags - a NULL pointer or an empty list. For now I've chosen a NULL pointer to avoid allocation of memory. There is some inconsistency here in lvm2app but the behavior is documented in the header for all functions that return lists.