diff options
author | Alasdair Kergon <agk@redhat.com> | 2002-02-25 12:56:16 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2002-02-25 12:56:16 +0000 |
commit | 413cc9189e5a77a10ce227072855141cd7af79d7 (patch) | |
tree | 57a1288121d4c70292b06c23b05f3c6c1d346178 /tools/pvchange.c | |
parent | ca73e23fd08850c916b9bf5671adfc68384ae466 (diff) | |
download | lvm2-413cc9189e5a77a10ce227072855141cd7af79d7.tar.gz lvm2-413cc9189e5a77a10ce227072855141cd7af79d7.tar.xz lvm2-413cc9189e5a77a10ce227072855141cd7af79d7.zip |
Begin conversion so LV id is passed to activation unit instead of
struct logical_volume.
Diffstat (limited to 'tools/pvchange.c')
-rw-r--r-- | tools/pvchange.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/pvchange.c b/tools/pvchange.c index 358d88a7..eb68fff5 100644 --- a/tools/pvchange.c +++ b/tools/pvchange.c @@ -98,32 +98,32 @@ int pvchange_single(struct cmd_context *cmd, struct physical_volume *pv) log_verbose("Finding volume group of physical volume \"%s\"", pv_name); - if (!lock_vol(pv->vg_name, LCK_VG | LCK_WRITE)) { + if (!lock_vol(cmd, pv->vg_name, LCK_VG | LCK_WRITE)) { log_error("Can't get lock for %s", pv->vg_name); return ECMD_FAILED; } if (!(vg = cmd->fid->ops->vg_read(cmd->fid, pv->vg_name))) { - lock_vol(pv->vg_name, LCK_VG | LCK_NONE); + lock_vol(cmd, pv->vg_name, LCK_VG | LCK_NONE); log_error("Unable to find volume group of \"%s\"", pv_name); return 0; } if (vg->status & EXPORTED_VG) { - lock_vol(pv->vg_name, LCK_VG | LCK_NONE); + lock_vol(cmd, pv->vg_name, LCK_VG | LCK_NONE); log_error("Volume group \"%s\" is exported", vg->name); return ECMD_FAILED; } if (!(vg->status & LVM_WRITE)) { - lock_vol(pv->vg_name, LCK_VG | LCK_NONE); + lock_vol(cmd, pv->vg_name, LCK_VG | LCK_NONE); log_error("Volume group \"%s\" is read-only", vg->name); return ECMD_FAILED; } if (!(pvl = find_pv_in_vg(vg, pv_name))) { - lock_vol(pv->vg_name, LCK_VG | LCK_NONE); + lock_vol(cmd, pv->vg_name, LCK_VG | LCK_NONE); log_error ("Unable to find \"%s\" in volume group \"%s\"", pv_name, vg->name); @@ -139,7 +139,7 @@ int pvchange_single(struct cmd_context *cmd, struct physical_volume *pv) log_error("Physical volume \"%s\" is already allocatable", pv_name); if (*pv->vg_name) - lock_vol(pv->vg_name, LCK_VG | LCK_NONE); + lock_vol(cmd, pv->vg_name, LCK_VG | LCK_NONE); return 0; } @@ -147,7 +147,7 @@ int pvchange_single(struct cmd_context *cmd, struct physical_volume *pv) log_error("Physical volume \"%s\" is already unallocatable", pv_name); if (*pv->vg_name) - lock_vol(pv->vg_name, LCK_VG | LCK_NONE); + lock_vol(cmd, pv->vg_name, LCK_VG | LCK_NONE); return 0; } @@ -164,13 +164,13 @@ int pvchange_single(struct cmd_context *cmd, struct physical_volume *pv) log_verbose("Updating physical volume \"%s\"", pv_name); if (*pv->vg_name) { if (!(cmd->fid->ops->vg_write(cmd->fid, vg))) { - lock_vol(pv->vg_name, LCK_VG | LCK_NONE); + lock_vol(cmd, pv->vg_name, LCK_VG | LCK_NONE); log_error("Failed to store physical volume \"%s\" in " "volume group \"%s\"", pv_name, vg->name); return 0; } backup(vg); - lock_vol(pv->vg_name, LCK_VG | LCK_NONE); + lock_vol(cmd, pv->vg_name, LCK_VG | LCK_NONE); } else { if (!(cmd->fid->ops->pv_write(cmd->fid, pv))) { log_error("Failed to store physical volume \"%s\"", |