Skip to contentSkip to conversation

master - report: remove LV_CREATE_PARAMS report type

PATCH Alasdair Kergon 1 participant 1 message Jul 9, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=dd302daf646f680531bf76ab13a9dafd06f63220
Commit:        dd302daf646f680531bf76ab13a9dafd06f63220
Parent:        5ed7d0cf1de4ebea6be8cb67759da40cb61c3913
Author:        Alasdair G Kergon <[email protected]>
AuthorDate:    Tue Jul 9 02:06:29 2013 +0100
Committer:     Alasdair G Kergon <[email protected]>
CommitterDate: Tue Jul 9 02:06:29 2013 +0100

report: remove LV_CREATE_PARAMS report type

Remove LV_CREATE_PARAMS from lib/report as it is not a type of metadata. Added by 4d5de8322b3a6050def60542b167b46d97b2824d

---
 lib/report/columns.h    |    2 -
 lib/report/properties.c |   86 ++++++---------
 lib/report/properties.h |    6 -
 lib/report/report.c     |    1 -
 lib/report/report.h     |    3 +-
 liblvm/lvm2app.h        |  152 -------------------------
 liblvm/lvm_lv.c         |  289 +----------------------------------------------
 liblvm/lvm_misc.c       |   16 +---
 liblvm/lvm_misc.h       |    6 +-
 liblvm/lvm_pv.c         |    4 +-
 liblvm/lvm_vg.c         |    4 +-
 tools/reporter.c        |    4 -
 12 files changed, 45 insertions(+), 528 deletions(-)
lib/report/columns.h +0 -2
index 4a05167..d13d19a 100644
@@ -164,6 +164,4 @@ FIELD(SEGS, seg, STR, "Monitor", list, 7, segmonitor, monitor, "Dmeventd monitor
 
 FIELD(PVSEGS, pvseg, NUM, "Start", pe, 5, uint32, pvseg_start, "Physical Extent number of start of segment.", 0)
 FIELD(PVSEGS, pvseg, NUM, "SSize", len, 5, uint32, pvseg_size, "Number of extents in segment.", 0)
-
-FIELD(LV_CREATE_PARAMS, lvcreate_params, NUM, "skip_zero", zero, 2, uint32, skip_zero, "Skip zeroing on lv creation", 1)
 /* *INDENT-ON* */
lib/report/properties.c +34 -52

196 lines not on this page · raw message

lib/report/properties.h +0 -6
index 1a08589..aefd3f5 100644
@@ -50,10 +50,4 @@ int vg_set_property(struct volume_group *vg,
 int pv_set_property(struct physical_volume *pv,
 		    struct lvm_property_type *prop);
 
-int lv_create_param_get_property(const struct lvcreate_params *lvcp,
-		struct lvm_property_type *prop);
-
-int lv_create_param_set_property(struct lvcreate_params *lvcp,
-		    struct lvm_property_type *prop);
-
 #endif
lib/report/report.c +0 -1
index 965859d..8b5455b 100644
@@ -1295,7 +1295,6 @@ typedef struct logical_volume type_lv;
 typedef struct volume_group type_vg;
 typedef struct lv_segment type_seg;
 typedef struct pv_segment type_pvseg;
-typedef struct lvcreate_params type_lvcreate_params;
 
 static const struct dm_report_field_type _fields[] = {
 #include "columns.h"
lib/report/report.h +1 -2
index d5bfb6a..26cc2f7 100644
@@ -24,8 +24,7 @@ typedef enum {
 	VGS	= 4,
 	SEGS	= 8,
 	PVSEGS	= 16,
-	LABEL	= 32,
-	LV_CREATE_PARAMS = 64
+	LABEL	= 32
 } report_type_t;
 
 struct field;
liblvm/lvm2app.h +0 -152

170 lines not on this page · raw message

liblvm/lvm_lv.c +2 -287

309 lines not on this page · raw message

liblvm/lvm_misc.c +2 -14
index de66417..0a0ea12 100644
@@ -47,8 +47,7 @@ struct dm_list *tag_list_copy(struct dm_pool *p, struct dm_list *tag_list)
 
 struct lvm_property_value get_property(const pv_t pv, const vg_t vg,
 				       const lv_t lv, const lvseg_t lvseg,
-				       const pvseg_t pvseg, const struct lvcreate_params *lvcp,
-				       const char *name)
+				       const pvseg_t pvseg, const char *name)
 {
 	struct lvm_property_type prop;
 	struct lvm_property_value v = { 0 };
@@ -70,9 +69,6 @@ struct lvm_property_value get_property(const pv_t pv, const vg_t vg,
 	} else if (pvseg) {
 		if (!pvseg_get_property(pvseg, &prop))
 			return v;
-	} else if (lvcp) {
-		if (!lv_create_param_get_property(lvcp, &prop))
-					return v;
 	} else {
 		log_errno(EINVAL, "Invalid NULL handle passed to library function.");
 		return v;
@@ -91,8 +87,7 @@ struct lvm_property_value get_property(const pv_t pv, const vg_t vg,
 
 
 int set_property(const pv_t pv, const vg_t vg, const lv_t lv,
-			struct lvcreate_params *lvcp, const char *name,
-			struct lvm_property_value *v)
+		 const char *name, struct lvm_property_value *v)
 {
 	struct lvm_property_type prop;
 
@@ -116,13 +111,6 @@ int set_property(const pv_t pv, const vg_t vg, const lv_t lv,
 			v->is_valid = 0;
 			return -1;
 		}
-	} else if (lvcp) {
-		if (!lv_create_param_set_property(lvcp, &prop)) {
-			v->is_valid = 0;
-			return -1;
-		}
-	} else {
-		return -1;
 	}
 	return 0;
 }
liblvm/lvm_misc.h +2 -4
index 76f4e0a..a0324b8 100644
@@ -20,10 +20,8 @@
 struct dm_list *tag_list_copy(struct dm_pool *p, struct dm_list *tag_list);
 struct lvm_property_value get_property(const pv_t pv, const vg_t vg,
 				       const lv_t lv, const lvseg_t lvseg,
-				       const pvseg_t pvseg, const struct lvcreate_params *lvcp,
-				       const char *name);
+				       const pvseg_t pvseg, const char *name);
 int set_property(const pv_t pv, const vg_t vg, const lv_t lv,
-			struct lvcreate_params *lvcp, const char *name,
-			struct lvm_property_value *value);
+		 const char *name, struct lvm_property_value *value);
 
 #endif
liblvm/lvm_pv.c +2 -2
index 5d8a66b..e679b3a 100644
@@ -53,13 +53,13 @@ uint64_t lvm_pv_get_free(const pv_t pv)
 
 struct lvm_property_value lvm_pv_get_property(const pv_t pv, const char *name)
 {
-	return get_property(pv, NULL, NULL, NULL, NULL, NULL, name);
+	return get_property(pv, NULL, NULL, NULL, NULL, name);
 }
 
 struct lvm_property_value lvm_pvseg_get_property(const pvseg_t pvseg,
 						 const char *name)
 {
-	return get_property(NULL, NULL, NULL, NULL, pvseg, NULL, name);
+	return get_property(NULL, NULL, NULL, NULL, pvseg, name);
 }
 
 struct lvm_list_wrapper
liblvm/lvm_vg.c +2 -2
index 955afdb..4a5fdf5 100644
@@ -339,7 +339,7 @@ const char *lvm_vg_get_name(const vg_t vg)
 
 struct lvm_property_value lvm_vg_get_property(const vg_t vg, const char *name)
 {
-	return get_property(NULL, vg, NULL, NULL, NULL, NULL, name);
+	return get_property(NULL, vg, NULL, NULL, NULL, name);
 }
 
 int lvm_vg_set_property(const vg_t vg, const char *name,
@@ -356,7 +356,7 @@ int lvm_vg_set_property(const vg_t vg, const char *name,
 				strlen(value->value.string) + 1);
 	}
 
-	return set_property(NULL, vg, NULL, NULL, name, value);
+	return set_property(NULL, vg, NULL, name, value);
 }
 
 struct dm_list *lvm_list_vg_names(lvm_t libh)
tools/reporter.c +0 -4
index ced7d56..a6941e3 100644
@@ -271,7 +271,6 @@ static int _report(struct cmd_context *cmd, int argc, char **argv,
 		else
 			options = find_config_tree_str(cmd, report_pvsegs_cols_verbose_CFG, NULL);
 		break;
-	case LV_CREATE_PARAMS:
 	default:
 		log_error(INTERNAL_ERROR "Unknown report type.");
 		return ECMD_FAILED;
@@ -383,9 +382,6 @@ static int _report(struct cmd_context *cmd, int argc, char **argv,
 			r = process_each_vg(cmd, argc, argv, 0,
 					    report_handle, &_pvsegs_in_vg);
 		break;
-
-	case LV_CREATE_PARAMS:
-			break;
 	}
 
 	dm_report_output(report_handle);