mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-02 13:47:42 +03:00
cov: add stack tracing for error paths
Add missing stack reports on error paths.
This commit is contained in:
parent
5cf1c61152
commit
66665f5e42
3
lib/cache/lvmcache.c
vendored
3
lib/cache/lvmcache.c
vendored
@ -2595,7 +2595,8 @@ void lvmcache_destroy(struct cmd_context *cmd, int retain_orphans, int reset)
|
||||
if (retain_orphans) {
|
||||
struct format_type *fmt;
|
||||
|
||||
lvmcache_init(cmd);
|
||||
if (!lvmcache_init(cmd))
|
||||
stack;
|
||||
|
||||
dm_list_iterate_items(fmt, &cmd->formats) {
|
||||
if (!lvmcache_add_orphan_vginfo(fmt->orphan_vg_name, fmt))
|
||||
|
@ -1101,7 +1101,8 @@ void bcache_destroy(struct bcache *cache)
|
||||
if (cache->nr_locked)
|
||||
log_warn("some blocks are still locked");
|
||||
|
||||
bcache_flush(cache);
|
||||
if (!bcache_flush(cache))
|
||||
log_warn("cache flushing failed.");
|
||||
_wait_all(cache);
|
||||
_exit_free_list(cache);
|
||||
_hash_table_exit(cache);
|
||||
|
@ -1344,7 +1344,8 @@ static int _check_for_open_devices(int close_immediate)
|
||||
dev_name(dev), dev->open_count);
|
||||
num_open++;
|
||||
if (close_immediate)
|
||||
dev_close_immediate(dev);
|
||||
if (!dev_close_immediate(dev))
|
||||
stack;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -521,7 +521,8 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet)
|
||||
/* dev_close_immediate will decrement this */
|
||||
dev->open_count++;
|
||||
|
||||
dev_close_immediate(dev);
|
||||
if (!dev_close_immediate(dev))
|
||||
stack;
|
||||
// FIXME: dev with DEV_ALLOCED is released
|
||||
// but code is referencing it
|
||||
}
|
||||
@ -599,7 +600,8 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet)
|
||||
if (!(dev->flags & DEV_REGULAR) &&
|
||||
((fstat(dev->fd, &buf) < 0) || (buf.st_rdev != dev->dev))) {
|
||||
log_error("%s: fstat failed: Has device name changed?", name);
|
||||
dev_close_immediate(dev);
|
||||
if (!dev_close_immediate(dev))
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user