Skip to contentSkip to conversation

master - lvresize: update lvresize_params struct

PATCH Zdenek Kabelac 1 participant 1 message Jun 23, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f45b68940667563e1a8d3bbd5d30864c04381bdf
Commit:        f45b68940667563e1a8d3bbd5d30864c04381bdf
Parent:        698082e67875fe71970fb932ffe2170d777f2807
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Jun 17 13:25:41 2016 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Jun 23 14:57:09 2016 +0200

lvresize: update lvresize_params struct

Reorganise struct lvresize_params to better fit lvresize needs to be able to resize more then just a single LV.

---
 lib/locking/lvmlockd.c           |    2 +-
 lib/metadata/lv_manip.c          |   98 ++++++++++++++--------------
 lib/metadata/metadata-exported.h |   52 +++++++---------
 liblvm/lvm_lv.c                  |    2 +-
 tools/lvresize.c                 |  128 +++++++++++++++----------------------
 5 files changed, 126 insertions(+), 156 deletions(-)
lib/locking/lvmlockd.c +1 -1
index 9eb7f92..e2b3e25 100644
@@ -372,7 +372,7 @@ static int _extend_sanlock_lv(struct cmd_context *cmd, struct volume_group *vg,
 		.size = lv->size + ((extend_mb * 1024 * 1024) / SECTOR_SIZE),
 		.percent = PERCENT_NONE,
 		.resize = LV_EXTEND,
-		.ac_force = 1,
+		.force = 1,
 		.sizeargs = 1,
 	};
 
lib/metadata/lv_manip.c +49 -49

248 lines not on this page · raw message

lib/metadata/metadata-exported.h +23 -29

74 lines not on this page · raw message

liblvm/lvm_lv.c +1 -1
index ee0d48b..467a9d0 100644
@@ -462,7 +462,7 @@ int lvm_lv_resize(const lv_t lv, uint64_t new_size)
 		.percent = PERCENT_NONE,
 		.resize = LV_ANY,
 		.size = new_size >> SECTOR_SHIFT,
-		.ac_force = 1,	/* Assume the user has a good backup? */
+		.force = 1,	/* Assume the user has a good backup? */
 		.sizeargs = 1,
 	};
 	struct saved_env e = store_user_env(lv->vg->cmd);
tools/lvresize.c +52 -76

190 lines not on this page · raw message