1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-06 00:58:48 +03:00

o Don't update vgcache when (not really) writing in test mode.

o Don't continue iterating through a possibly-deleted list.
This commit is contained in:
Alasdair Kergon 2002-01-16 14:43:27 +00:00
parent 3c06874035
commit 93ea39697f
2 changed files with 7 additions and 5 deletions

View File

@ -354,8 +354,9 @@ int read_pvs_in_vg(const char *vg_name, struct dev_filter *filter,
if ((pvdh = vgcache_find(vg_name))) {
list_iterate(pvdh2, pvdh) {
dev = list_item(pvdh2, struct pvdev_list)->dev;
if ((data = read_disk(dev, mem, vg_name)))
list_add(head, &data->list);
if (!(data = read_disk(dev, mem, vg_name)))
break;
list_add(head, &data->list);
}
/* Did we find the whole VG? */
@ -502,7 +503,8 @@ static int __write_all_pvd(struct disk_list *data)
return 0;
}
vgcache_add(data->pvd.vg_name, data->dev);
if (!test_mode())
vgcache_add(data->pvd.vg_name, data->dev);
/*
* Stop here for orphan pv's.
*/

View File

@ -107,7 +107,7 @@ int process_each_lv(int argc, char **argv,
ret_max = ret;
}
} else {
log_verbose("Finding all logical volume(s)");
log_verbose("Finding all logical volumes");
if (!(vgs = fid->ops->get_vgs(fid))) {
log_error("No volume groups found");
return ECMD_FAILED;
@ -146,7 +146,7 @@ int process_each_vg(int argc, char **argv,
if ((ret = process_single(argv[opt])) > ret_max)
ret_max = ret;
} else {
log_verbose("Finding all volume group(s)");
log_verbose("Finding all volume groups");
if (!(vgs = fid->ops->get_vgs(fid))) {
log_error("No volume groups found");
return ECMD_FAILED;