[dm-devel] [PATCH 26/42] Print log messages when updating tables failed
Hannes Reinecke
hare at suse.de
Tue Jan 8 13:54:04 UTC 2013
Add some logging messages to identify the case of failure.
Signed-off-by: Hannes Reinecke <hare at suse.de>
---
libmultipath/structs_vec.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index 6d36d58..384afb7 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -246,11 +246,15 @@ update_multipath_table (struct multipath *mpp, vector pathvec)
if (!mpp)
return 1;
- if (dm_get_map(mpp->alias, &mpp->size, params))
+ if (dm_get_map(mpp->alias, &mpp->size, params)) {
+ condlog(3, "%s: cannot get map", mpp->alias);
return 1;
+ }
- if (disassemble_map(pathvec, params, mpp))
+ if (disassemble_map(pathvec, params, mpp)) {
+ condlog(3, "%s: cannot disassemble map", mpp->alias);
return 1;
+ }
return 0;
}
@@ -263,11 +267,15 @@ update_multipath_status (struct multipath *mpp)
if (!mpp)
return 1;
- if(dm_get_status(mpp->alias, status))
+ if (dm_get_status(mpp->alias, status)) {
+ condlog(3, "%s: cannot get status", mpp->alias);
return 1;
+ }
- if (disassemble_status(status, mpp))
+ if (disassemble_status(status, mpp)) {
+ condlog(3, "%s: cannot disassemble status", mpp->alias);
return 1;
+ }
return 0;
}
--
1.7.4.2
More information about the dm-devel
mailing list