master - lvm2app: Add thinp snapshot functionality
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=49e3eecc33dbe0a47d8dcdbf225ddd52a8a6b75d Commit: 49e3eecc33dbe0a47d8dcdbf225ddd52a8a6b75d Parent: 2a3472b2b34d2ef82cc04eb89bd29dfb456e2d47 Author: Tony Asleson <[email protected]> AuthorDate: Thu Jun 6 16:40:51 2013 -0400 Committer: Tony Asleson <[email protected]> CommitterDate: Tue Jul 2 14:24:34 2013 -0500
lvm2app: Add thinp snapshot functionality
Added parameter object constructor for thinp and
changed the shapshot function to use it.
Signed-off-by Tony Asleson <[email protected]>
--- liblvm/lvm2app.h | 21 +++++++++++- liblvm/lvm_lv.c | 100 ++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 88 insertions(+), 33 deletions(-)
liblvm/lvm2app.h +20 -1
@@ -1538,7 +1538,26 @@ lv_create_params_t lvm_lv_params_create_thin_pool(vg_t vg, LVM_THIN_DISCARDS_PASSDOWN) - +/** +* Creates the snapshot parameter passing object for the specified lv. +* +* \param lv +* The logical volume to snapshot +* +* \param snap_name +* Name of snapshot +* +* \param max_snap_size +* Used for old snap shots max size, set to zero for thinp +* +* \return +* Valid lv_create_params pointer on success, else NULL on error. +* Note: Memory is associated with the vg, it will get reclaimed when vg is +* closed. +*/ +lv_create_params_t lvm_lv_params_create_snapshot(const lv_t lv, +const char *snap_name, +uint64_t max_snap_size);/** * Get the specific value of a lv create parameter by name *
liblvm/lvm_lv.c +68 -32
115 lines not on this page · raw message