: Implement lvm_vg_create() and 4 required vg_set*() APIs
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 | Update vg_change_pesize() to contain all validity checks.lib/ tools/ | +32 | 0 replies | |
| 2/7 | Remove unused 'cmd' from vg_change_pesize().lib/ lib/ tools/ | +3 | 0 replies | |
| 3/7 | Rename vg_change_pesize to vg_set_extent_size and use vg_t.lib/ lib/ tools/ | +3 | 0 replies | |
| 4/7 | Add vg_set_max_lv() liblvm function and move vgchange logic inside.lib/ lib/ tools/ | +31 | 0 replies | |
| 5/7 | Add vg_set_max_pv() liblvm function and move vgchange logic inside.lib/ lib/ tools/ | +30 | 0 replies | |
| 6/7 | Add vg_set_alloc() liblvm function and move vgchange logic inside.lib/ lib/ tools/ | +21 | 1 reply | |
| 7/7 | Add lvm_vg_create() - vg constructor API for new volume groups.lib/ lib/ tools/ +1 more | +75 | 4 replies | |
| 7/7 | Add lvm_vg_create() - vg constructor API for new volume groups. | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/7]: Implement lvm_vg_create() and 4 required vg_set*() APIs
The following 7 patches implement the beginning of lvm_vg_create() liblvm API. This API will create a VG with default parameters and return a vg_t. Later, if any parameters of the VG need set, they are done with a separate 'set' call. This is the approach that was discussed for liblvm, and required some refactoring of the code, including vgcreate and vgsplit. The reason for the refactoring of vgcreate and vgsplit is that the existing vg_create() constructor did not take this approach, but rather took input parameters such as extent_size, max_pv, max_lv, etc. Thus, to implement what was decided, I had to pull out all the validity checks into a separate 'set' function.
In addition, lvm_vg_create() now takes the place of vg_lock_newname() in both vgcreate and vgsplit. I believe that down the road we may not have to export vg_lock_newname() but can use lvm_vg_create() for the existence check, and as a complement to the vg_read() APIs. The only remaining use of vg_lock_newname() is in vgrename, and this use can be hidden inside a vgrename API.
Note that in a few cases, for the 'set' functions, the return codes have been modified slightly. The cases are things like EINVALID_CMD_LINE becomes ECMD_FAILED, and setting the same value returning SUCCESS or FAILURE (this was inconsistent in the code - sometimes it was an error, sometimes it was success - I made it always a success).
Passes the testsuite, and should apply cleanly on:
commit ea47a922568e19202ac365b5eb00bf55b4b6d8a2
Author: Dave Wysochanski <[email protected]> Date: Mon Jul 6 21:42:25 2009 -0400
Fix compile warning in lvmcmdline.c - use C99 PRIu64 for uint64_t.