diff options
author | David Teigland <teigland@redhat.com> | 2021-02-03 13:44:10 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2021-02-03 13:44:10 -0600 |
commit | 67d8fb1e83002f702f9c995ec96ffc723ea0d6ce (patch) | |
tree | da908afe57f415b109692dcc40bcec5c2e5e7d3c /device_mapper/ioctl | |
parent | 834cba000a68675909844865f56e77ab62c1943b (diff) | |
download | lvm2-67d8fb1e83002f702f9c995ec96ffc723ea0d6ce.tar.gz |
dm: add debugging to include table differences
When dm tables are reloaded, include log_debug info
that will show the details of why the reload is needed.
Diffstat (limited to 'device_mapper/ioctl')
-rw-r--r-- | device_mapper/ioctl/libdm-iface.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/device_mapper/ioctl/libdm-iface.c b/device_mapper/ioctl/libdm-iface.c index 8e7240673..1140798e6 100644 --- a/device_mapper/ioctl/libdm-iface.c +++ b/device_mapper/ioctl/libdm-iface.c @@ -1582,23 +1582,30 @@ static int _reload_with_suppression_v4(struct dm_task *dmt) t2->params[len] = '\0'; if (t1->start != t2->start) { - log_debug("reload %u:%u start diff", task->major, task->minor); + log_debug("reload %u:%u diff start %llu %llu type %s %s", task->major, task->minor, + (unsigned long long)t1->start, (unsigned long long)t2->start, t1->type, t2->type); goto no_match; } if (t1->length != t2->length) { - log_debug("reload %u:%u length diff", task->major, task->minor); + log_debug("reload %u:%u diff length %llu %llu type %s %s", task->major, task->minor, + (unsigned long long)t1->length, (unsigned long long)t2->length, t1->type, t2->type); goto no_match; } if (strcmp(t1->type, t2->type)) { - log_debug("reload %u:%u type diff %s %s", task->major, task->minor, t1->type, t2->type); + log_debug("reload %u:%u diff type %s %s", task->major, task->minor, t1->type, t2->type); goto no_match; } if (strcmp(t1->params, t2->params)) { - if (dmt->skip_reload_params_compare) - log_debug("reload %u:%u skip params ignore %s %s", - task->major, task->minor, t1->params, t2->params); - else { - log_debug("reload %u:%u params diff", task->major, task->minor); + if (dmt->skip_reload_params_compare) { + log_debug("reload %u:%u diff params ignore for type %s", + task->major, task->minor, t1->type); + log_debug("reload params1 %s", t1->params); + log_debug("reload params2 %s", t2->params); + } else { + log_debug("reload %u:%u diff params for type %s", + task->major, task->minor, t1->type); + log_debug("reload params1 %s", t1->params); + log_debug("reload params2 %s", t2->params); goto no_match; } } |