1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Add stack trace for error path

If dm_task_set_cookie() fails print stack trace, but keep going on.
This commit is contained in:
Zdenek Kabelac 2010-11-30 22:40:19 +00:00
parent 5b8abb1240
commit 8865a4c19e
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.78 - Version 2.02.78 -
==================================== ====================================
Add error path stack traces for _process_mapper_dir(), _create_and_load_v4().
Add missing test for failed pool allocation in write_config_node(). Add missing test for failed pool allocation in write_config_node().
Replace snprintf with dm_snprintf in clvmd-command.c. Replace snprintf with dm_snprintf in clvmd-command.c.
Check reallocated buffer for NULL before use in clvmd do_command(). Check reallocated buffer for NULL before use in clvmd do_command().

View File

@ -1779,9 +1779,10 @@ static int _create_and_load_v4(struct dm_task *dmt)
if (dmt->cookie_set) { if (dmt->cookie_set) {
cookie = (dmt->event_nr & ~DM_UDEV_FLAGS_MASK) | cookie = (dmt->event_nr & ~DM_UDEV_FLAGS_MASK) |
(DM_COOKIE_MAGIC << DM_UDEV_FLAGS_SHIFT); (DM_COOKIE_MAGIC << DM_UDEV_FLAGS_SHIFT);
dm_task_set_cookie(dmt, &cookie, if (!dm_task_set_cookie(dmt, &cookie,
(dmt->event_nr & DM_UDEV_FLAGS_MASK) >> (dmt->event_nr & DM_UDEV_FLAGS_MASK) >>
DM_UDEV_FLAGS_SHIFT); DM_UDEV_FLAGS_SHIFT))
stack; /* keep going */
} }
if (!dm_task_run(dmt)) if (!dm_task_run(dmt))