1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Refactor pv_create() to take cmd_context - no functional change.

This commit is contained in:
Dave Wysochanski 2008-06-24 20:10:32 +00:00
parent 274788b4a5
commit 15db00b53e
4 changed files with 5 additions and 5 deletions

View File

@ -347,7 +347,7 @@ vg_t *vg_lock_and_read(struct cmd_context *cmd, const char *vg_name,
/* pe_start and pe_end relate to any existing data so that new metadata /* pe_start and pe_end relate to any existing data so that new metadata
* areas can avoid overlap */ * areas can avoid overlap */
pv_t *pv_create(const struct format_type *fmt, pv_t *pv_create(const struct cmd_context *cmd,
struct device *dev, struct device *dev,
struct id *id, struct id *id,
uint64_t size, uint64_t size,

View File

@ -747,7 +747,7 @@ int vg_split_mdas(struct cmd_context *cmd __attribute((unused)),
* Note: * Note:
* FIXME - liblvm todo - tidy up arguments for external use (fmt, mdas, etc) * FIXME - liblvm todo - tidy up arguments for external use (fmt, mdas, etc)
*/ */
pv_t *pv_create(const struct format_type *fmt, pv_t *pv_create(const struct cmd_context *cmd,
struct device *dev, struct device *dev,
struct id *id, uint64_t size, struct id *id, uint64_t size,
uint64_t pe_start, uint64_t pe_start,
@ -756,7 +756,7 @@ pv_t *pv_create(const struct format_type *fmt,
int pvmetadatacopies, int pvmetadatacopies,
uint64_t pvmetadatasize, struct list *mdas) uint64_t pvmetadatasize, struct list *mdas)
{ {
return _pv_create(fmt, dev, id, size, pe_start, return _pv_create(cmd->fmt, dev, id, size, pe_start,
existing_extent_count, existing_extent_count,
existing_extent_size, existing_extent_size,
pvmetadatacopies, pvmetadatacopies,

View File

@ -225,7 +225,7 @@ static int pvcreate_single(struct cmd_context *cmd, const char *pv_name,
} }
list_init(&mdas); list_init(&mdas);
if (!(pv = pv_create(cmd->fmt, dev, idp, size, pe_start, if (!(pv = pv_create(cmd, dev, idp, size, pe_start,
extent_count, extent_size, extent_count, extent_size,
pvmetadatacopies, pvmetadatasize, &mdas))) { pvmetadatacopies, pvmetadatasize, &mdas))) {
log_error("Failed to setup physical volume \"%s\"", pv_name); log_error("Failed to setup physical volume \"%s\"", pv_name);

View File

@ -112,7 +112,7 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name,
+ pe_start - 1; + pe_start - 1;
list_init(&mdas); list_init(&mdas);
if (!(pv = pv_create(cmd->fmt, pv_dev(existing_pv), if (!(pv = pv_create(cmd, pv_dev(existing_pv),
&existing_pv->id, size, &existing_pv->id, size,
pe_start, pv_pe_count(existing_pv), pe_start, pv_pe_count(existing_pv),
pv_pe_size(existing_pv), pvmetadatacopies, pv_pe_size(existing_pv), pvmetadatacopies,