1
0
mirror of git://sourceware.org/git/lvm2.git synced 2026-01-25 00:32:58 +03:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Alasdair Kergon
ec8efa35a1 revert 2006-10-16 16:47:56 +00:00
Alasdair Kergon
f72bf20482 pre-release 2006-10-16 16:44:28 +00:00
Alasdair Kergon
ebde2002e8 Fix pvdisplay to use vg_read() for non-orphans 2006-10-16 16:29:40 +00:00
Alasdair Kergon
352a66f46f Fall back to internal locking if external locking lib is missing or fails. 2006-10-14 16:37:54 +00:00
Alasdair Kergon
d84c5391f7 Retain activation state after changing LV minor number with --force. 2006-10-13 21:33:31 +00:00
Alasdair Kergon
f4c582472b post-release.
Note that I've dropped the 2.4 kernel files from the release tarballs now.
2006-10-13 19:01:30 +00:00
6 changed files with 52 additions and 21 deletions

View File

@@ -1 +1 @@
2.02.12-cvs (2006-10-12)
2.02.12-cvs (2006-10-16)

View File

@@ -1,6 +1,9 @@
Version 2.02.12 -
Version 2.02.12 - 16th October 2006
===================================
Propogate clustered flag in vgsplit and require resizeable flag.
Fix pvdisplay to use vg_read() for non-orphans.
Fall back to internal locking if external locking lib is missing or fails.
Retain activation state after changing LV minor number with --force.
Propagate clustered flag in vgsplit and require resizeable flag.
Version 2.02.11 - 12th October 2006
===================================

View File

@@ -1,3 +1,6 @@
Version 1.02.13 -
=============================
Version 1.02.12 - 13 Oct 2006
=============================
Avoid deptree attempting to suspend a device that's already suspended.

View File

@@ -144,18 +144,18 @@ int init_locking(int type, struct cmd_context *cmd)
case 2:
if (!cmd->is_static) {
log_very_verbose("External locking selected.");
if (!init_external_locking(&_locking, cmd))
break;
return 1;
if (init_external_locking(&_locking, cmd))
return 1;
}
if (!find_config_tree_int(cmd, "locking/fallback_to_clustered_locking",
DEFAULT_FALLBACK_TO_CLUSTERED_LOCKING))
break;
log_very_verbose("Falling back to clustered locking.");
/* Fall through */
#endif
#ifdef CLUSTER_LOCKING_INTERNAL
log_very_verbose("Falling back to internal clustered locking.");
/* Fall through */
case 3:
log_very_verbose("Cluster locking selected.");
if (!init_cluster_locking(&_locking, cmd))

View File

@@ -294,16 +294,15 @@ static int lvchange_persistent(struct cmd_context *cmd,
log_error("Major number must be specified with -My");
return 0;
}
if (lv_info(cmd, lv, &info, 0) && info.exists &&
!arg_count(cmd, force_ARG)) {
if (yes_no_prompt("Logical volume %s will be "
"deactivated temporarily. "
"Continue? [y/n]: ", lv->name) == 'n') {
log_print("%s device number not changed.",
lv->name);
return 0;
}
if (lv_info(cmd, lv, &info, 0) && info.exists)
active = 1;
if (active && !arg_count(cmd, force_ARG) &&
yes_no_prompt("Logical volume %s will be "
"deactivated temporarily. "
"Continue? [y/n]: ", lv->name) == 'n') {
log_print("%s device number not changed.",
lv->name);
return 0;
}
log_verbose("Ensuring %s is inactive.", lv->name);
if (!deactivate_lv(cmd, lv)) {

View File

@@ -19,10 +19,32 @@ static int _pvdisplay_single(struct cmd_context *cmd,
struct volume_group *vg __attribute((unused)),
struct physical_volume *pv, void *handle)
{
int consistent = 0;
int ret = ECMD_PROCESSED;
uint64_t size;
const char *pv_name = dev_name(pv->dev);
if (pv->vg_name) {
if (!lock_vol(cmd, pv->vg_name, LCK_VG_READ)) {
log_error("Can't lock %s: skipping", pv->vg_name);
return ECMD_FAILED;
}
if (!(vg = vg_read(cmd, pv->vg_name, (char *)&pv->vgid, &consistent))) {
log_error("Can't read %s: skipping", pv->vg_name);
goto out;
}
if ((vg->status & CLUSTERED) && !locking_is_clustered() &&
!lockingfailed()) {
log_error("Skipping clustered volume group %s",
vg->name);
ret = ECMD_FAILED;
goto out;
}
}
if (!*pv->vg_name)
size = pv->size;
else
@@ -31,7 +53,7 @@ static int _pvdisplay_single(struct cmd_context *cmd,
if (arg_count(cmd, short_ARG)) {
log_print("Device \"%s\" has a capacity of %s", pv_name,
display_size(cmd, size));
return ECMD_PROCESSED;
goto out;
}
if (pv->status & EXPORTED_VG)
@@ -44,15 +66,19 @@ static int _pvdisplay_single(struct cmd_context *cmd,
if (arg_count(cmd, colon_ARG)) {
pvdisplay_colons(pv);
return ECMD_PROCESSED;
goto out;
}
pvdisplay_full(cmd, pv, handle);
if (!arg_count(cmd, maps_ARG))
return ECMD_PROCESSED;
goto out;
return ECMD_PROCESSED;
out:
if (pv->vg_name)
unlock_vg(cmd, pv->vg_name);
return ret;
}
int pvdisplay(struct cmd_context *cmd, int argc, char **argv)