master - dmeventd: improved logged messages from thin plugin
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=adc1fe4b3f84b341383d9737162397426e1a1295 Commit: adc1fe4b3f84b341383d9737162397426e1a1295 Parent: 52be93c54bfedf16bb86472c03b6833d2be0efd1 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Jul 4 17:30:27 2016 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Jul 4 17:40:24 2016 +0200
dmeventd: improved logged messages from thin plugin
Show better names in logged messages.
--- daemons/dmeventd/plugins/thin/dmeventd_thin.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-)
daemons/dmeventd/plugins/thin/dmeventd_thin.c +10 -5
@@ -94,7 +94,7 @@ static int _has_unmountable_prefix(int major, int minor) goto out;#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 r =1 ; out:
@@ -246,13 +246,18 @@ static int _umount_device(char *buffer, unsigned major, unsigned minor, char *target, void *cb_data) { struct mountinfo_s *data = cb_data; +char *words[10 ];if ((major == data->info.major) &&dm_bit (data->minors, minor)) { -log_info ("Unmounting thin volume %s from %s." , - data->device, target); +if (dm_split_words (buffer,DM_ARRAY_SIZE (words),0 , words) <DM_ARRAY_SIZE (words)) + 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 )) -log_error ("Failed to umount thin %s from %s: %s." , - data->device, target,strerror (errno)); +log_error ("Failed to lazy umount thin %s (%d:%d) from %s: %s." , + words[9 ], major, minor, target,strerror (errno)); }return 1 ;