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

Remove unneeded import parameter from lv_create_empty.

This commit is contained in:
Milan Broz 2009-05-13 21:28:31 +00:00
parent afd9ba98c1
commit 82cf926094
7 changed files with 9 additions and 11 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.46 -
================================
Remove unneeded import parameter from lv_create_empty.
Merge lv_is_displayable and lv_is_visible functions.
Introduce lv_set_visible & lv_set_invisible functions.
Fix lv_is_visible to handle virtual origin.

View File

@ -1811,7 +1811,6 @@ struct logical_volume *lv_create_empty(const char *name,
union lvid *lvid,
uint32_t status,
alloc_policy_t alloc,
int import,
struct volume_group *vg)
{
struct format_instance *fi = vg->fid;
@ -1831,7 +1830,6 @@ struct logical_volume *lv_create_empty(const char *name,
return NULL;
}
if (!import)
log_verbose("Creating logical volume %s", name);
if (!(lv = dm_pool_zalloc(vg->vgmem, sizeof(*lv))))
@ -2417,7 +2415,7 @@ struct logical_volume *insert_layer_for_lv(struct cmd_context *cmd,
}
if (!(layer_lv = lv_create_empty(name, NULL, LVM_READ | LVM_WRITE,
ALLOC_INHERIT, 0, lv_where->vg))) {
ALLOC_INHERIT, lv_where->vg))) {
log_error("Creation of layer LV failed");
return NULL;
}

View File

@ -448,7 +448,6 @@ struct logical_volume *lv_create_empty(const char *name,
union lvid *lvid,
uint32_t status,
alloc_policy_t alloc,
int import,
struct volume_group *vg);
/* Write out LV contents */

View File

@ -932,7 +932,7 @@ static int _create_mimage_lvs(struct alloc_handle *ah,
for (m = 0; m < num_mirrors; m++) {
if (!(img_lvs[m] = lv_create_empty(img_name,
NULL, LVM_READ | LVM_WRITE,
ALLOC_INHERIT, 0, lv->vg))) {
ALLOC_INHERIT, lv->vg))) {
log_error("Aborting. Failed to create mirror image LV. "
"Remove new LV and retry.");
return 0;
@ -1266,7 +1266,7 @@ static struct logical_volume *_create_mirror_log(struct logical_volume *lv,
if (!(log_lv = lv_create_empty(log_name, NULL,
VISIBLE_LV | LVM_READ | LVM_WRITE,
alloc, 0, lv->vg)))
alloc, lv->vg)))
return_NULL;
if (!lv_add_log_segment(ah, log_lv))

View File

@ -105,7 +105,7 @@ int vg_add_snapshot(struct logical_volume *origin,
if (!(snap = lv_create_empty("snapshot%d",
lvid, LVM_READ | LVM_WRITE | VISIBLE_LV,
ALLOC_INHERIT, 1, origin->vg)))
ALLOC_INHERIT, origin->vg)))
return_0;
snap->le_count = extent_count;

View File

@ -577,7 +577,7 @@ static struct logical_volume *_create_virtual_origin(struct cmd_context *cmd,
}
if (!(lv = lv_create_empty(vorigin_name, NULL, permission,
ALLOC_INHERIT, 0, vg)))
ALLOC_INHERIT, vg)))
return_0;
if (!lv_extend(lv, segtype, 1, 0, 1, voriginextents, NULL, 0u, 0u,
@ -824,7 +824,7 @@ static int _lvcreate(struct cmd_context *cmd, struct volume_group *vg,
}
if (!(lv = lv_create_empty(lv_name ? lv_name : "lvol%d", NULL,
status, lp->alloc, 0, vg)))
status, lp->alloc, vg)))
return_0;
if (lp->read_ahead) {

View File

@ -191,7 +191,7 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
/* FIXME Cope with non-contiguous => splitting existing segments */
if (!(lv_mirr = lv_create_empty("pvmove%d", NULL,
LVM_READ | LVM_WRITE,
ALLOC_CONTIGUOUS, 0, vg))) {
ALLOC_CONTIGUOUS, vg))) {
log_error("Creation of temporary pvmove LV failed");
return NULL;
}