Version 2.02.67 -
===============================
+ Extend process_each_lv_in_vg() with support for list of failed lvnames.
Return ECMD_FAILED for break in process_each_lv() and process_each_segment_in_lv().
Version 2.02.66 - 20th May 2010
struct volume_group *vg,
const struct dm_list *arg_lvnames,
const struct dm_list *tags,
+ struct dm_list *failed_lvnames,
void *handle,
process_single_lv_fn_t process_single_lv)
{
unsigned tags_supplied = 0;
unsigned lvargs_supplied = 0;
unsigned lvargs_matched = 0;
-
+ char *lv_name;
struct lv_list *lvl;
if (!vg_check_status(vg, EXPORTED_VG))
continue;
ret = process_single_lv(cmd, lvl->lv, handle);
+ if (ret != ECMD_PROCESSED && failed_lvnames) {
+ lv_name = dm_pool_strdup(cmd->mem, lvl->lv->name);
+ if (!lv_name ||
+ !str_list_add(cmd->mem, failed_lvnames, lv_name)) {
+ log_error("Allocation failed for str_list.");
+ return ECMD_FAILED;
+ }
+ }
if (ret > ret_max)
ret_max = ret;
if (sigint_caught())
}
ret = process_each_lv_in_vg(cmd, vg, &lvnames, tags_arg,
- handle, process_single_lv);
+ NULL, handle, process_single_lv);
unlock_and_release_vg(cmd, vg, vgname);
if (ret > ret_max)
ret_max = ret;
struct volume_group *vg,
const struct dm_list *arg_lvnames,
const struct dm_list *tags,
+ struct dm_list *failed_lvnames,
void *handle,
process_single_lv_fn_t process_single_lv);
if (arg_count(cmd, verbose_ARG)) {
vgdisplay_extents(vg);
- process_each_lv_in_vg(cmd, vg, NULL, NULL, NULL,
+ process_each_lv_in_vg(cmd, vg, NULL, NULL, NULL, NULL,
(process_single_lv_fn_t)lvdisplay_full);
log_print("--- Physical volumes ---");