memcpy(&lockd_data_id, &lv->lvid.id[1], sizeof(struct id));
}
+ /*
+ * The internal LV names for pool data/meta LVs.
+ */
+
+ if ((dm_snprintf(meta_name, sizeof(meta_name), "%s%s", lv->name, to_cachepool ? "_cmeta" : "_tmeta") < 0) ||
+ (dm_snprintf(data_name, sizeof(data_name), "%s%s", lv->name, to_cachepool ? "_cdata" : "_tdata") < 0)) {
+ log_error("Failed to create internal lv names, pool name is too long.");
+ return 0;
+ }
+
/*
* If an existing LV is to be used as the metadata LV,
* verify that it's in a usable state. These checks are
log_verbose("Pool metadata extents %u chunk_size %u", meta_extents, chunk_size);
-
/*
* Verify that user wants to use these LVs.
*/
return 0;
}
- /*
- * The internal LV names for pool data/meta LVs.
- */
-
- if ((dm_snprintf(meta_name, sizeof(meta_name), "%s%s", lv->name, to_cachepool ? "_cmeta" : "_tmeta") < 0) ||
- (dm_snprintf(data_name, sizeof(data_name), "%s%s", lv->name, to_cachepool ? "_cdata" : "_tdata") < 0)) {
- log_error("Failed to create internal lv names, pool name is too long.");
- return 0;
- }
-
/*
* If a new metadata LV needs to be created, collect the settings for
* the new LV and create it.