mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dmeventd: improved logged messages from thin plugin
Show better names in logged messages.
This commit is contained in:
parent
52be93c54b
commit
adc1fe4b3f
@ -94,7 +94,7 @@ static int _has_unmountable_prefix(int major, int minor)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
#if THIN_DEBUG
|
#if THIN_DEBUG
|
||||||
log_debug("Found LV (%u:%u) %s.", major, minor, uuid);
|
log_debug("Found logical volume %s (%u:%u).", uuid, major, minor);
|
||||||
#endif
|
#endif
|
||||||
r = 1;
|
r = 1;
|
||||||
out:
|
out:
|
||||||
@ -246,13 +246,18 @@ static int _umount_device(char *buffer, unsigned major, unsigned minor,
|
|||||||
char *target, void *cb_data)
|
char *target, void *cb_data)
|
||||||
{
|
{
|
||||||
struct mountinfo_s *data = cb_data;
|
struct mountinfo_s *data = cb_data;
|
||||||
|
char *words[10];
|
||||||
|
|
||||||
if ((major == data->info.major) && dm_bit(data->minors, minor)) {
|
if ((major == data->info.major) && dm_bit(data->minors, minor)) {
|
||||||
log_info("Unmounting thin volume %s from %s.",
|
if (dm_split_words(buffer, DM_ARRAY_SIZE(words), 0, words) < DM_ARRAY_SIZE(words))
|
||||||
data->device, target);
|
words[9] = NULL; /* just don't show device name */
|
||||||
|
log_info("Unmounting thin %s (%d:%d) of thin-pool %s (%u:%u) from mount point \"%s\".",
|
||||||
|
words[9] ? : "", major, minor, data->device,
|
||||||
|
data->info.major, data->info.minor,
|
||||||
|
target);
|
||||||
if (!_run(UMOUNT_COMMAND, "-fl", target, NULL))
|
if (!_run(UMOUNT_COMMAND, "-fl", target, NULL))
|
||||||
log_error("Failed to umount thin %s from %s: %s.",
|
log_error("Failed to lazy umount thin %s (%d:%d) from %s: %s.",
|
||||||
data->device, target, strerror(errno));
|
words[9], major, minor, target, strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user