mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: add stacktraces
Add stacktraces for unexpected paths.
This commit is contained in:
parent
699696b0a6
commit
6ebcb0015e
@ -294,7 +294,8 @@ static int _add_alias(struct device *dev, const char *path, enum add_hash hash)
|
||||
size_t path_len = strlen(path);
|
||||
|
||||
if (hash == REHASH)
|
||||
radix_tree_remove(_cache.names, path, path_len);
|
||||
if (!radix_tree_remove(_cache.names, path, path_len))
|
||||
stack;
|
||||
|
||||
/* Is name already there? */
|
||||
dm_list_iterate_items(strl, &dev->aliases)
|
||||
@ -696,7 +697,8 @@ void dev_cache_failed_path(struct device *dev, const char *path)
|
||||
{
|
||||
struct dm_str_list *strl;
|
||||
|
||||
radix_tree_remove(_cache.names, path, strlen(path));
|
||||
if (!radix_tree_remove(_cache.names, path, strlen(path)))
|
||||
stack;
|
||||
|
||||
dm_list_iterate_items(strl, &dev->aliases) {
|
||||
if (!strcmp(strl->str, path)) {
|
||||
@ -1187,7 +1189,8 @@ static void _drop_all_aliases(struct device *dev)
|
||||
|
||||
dm_list_iterate_items_safe(strl, strl2, &dev->aliases) {
|
||||
log_debug("Drop alias for %u:%u %s.", MAJOR(dev->dev), MINOR(dev->dev), strl->str);
|
||||
radix_tree_remove(_cache.names, strl->str, strlen(strl->str));
|
||||
if (!radix_tree_remove(_cache.names, strl->str, strlen(strl->str)))
|
||||
stack;
|
||||
dm_list_del(&strl->list);
|
||||
}
|
||||
}
|
||||
@ -1621,7 +1624,8 @@ void dev_cache_verify_aliases(struct device *dev)
|
||||
log_debug("Drop alias for %u:%u invalid path %s %u:%u.",
|
||||
MAJOR(dev->dev), MINOR(dev->dev), strl->str,
|
||||
MAJOR(st.st_rdev), MINOR(st.st_rdev));
|
||||
radix_tree_remove(_cache.names, strl->str, strlen(strl->str));
|
||||
if (!radix_tree_remove(_cache.names, strl->str, strlen(strl->str)))
|
||||
stack;
|
||||
dm_list_del(&strl->list);
|
||||
}
|
||||
}
|
||||
@ -1655,7 +1659,8 @@ static struct device *_dev_cache_get(struct cmd_context *cmd, const char *name,
|
||||
log_debug("Device path %s is invalid for %u:%u %s.",
|
||||
name, MAJOR(dev->dev), MINOR(dev->dev), dev_name(dev));
|
||||
|
||||
radix_tree_remove(_cache.names, name, strlen(name));
|
||||
if (!radix_tree_remove(_cache.names, name, strlen(name)))
|
||||
stack;
|
||||
|
||||
_remove_alias(dev, name);
|
||||
|
||||
|
@ -23,7 +23,8 @@ static int _vgmknodes_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
log_error("Refresh failed for %s.", display_lvname(lv));
|
||||
return_ECMD_FAILED;
|
||||
}
|
||||
sync_local_dev_names(cmd);
|
||||
if (!sync_local_dev_names(cmd))
|
||||
stack;
|
||||
}
|
||||
|
||||
if (!lv_mknodes(cmd, lv))
|
||||
|
Loading…
Reference in New Issue
Block a user