multipathd: add failures path format wildcard
Benjamin Marzinski
maintainerPATCH 1/2 multipathd: add failures path format wildcard
multipath already tracks this, so it should be able to print it out.
Signed-off-by Benjamin Marzinski <[email protected]>
--- libmultipath/print.c | 7 +++++++ 1 file changed, 7 insertions(+)
libmultipath/print.c +7 -0
@@ -632,6 +632,12 @@ snprint_path_foreign (char * buff, size_t len, const struct path * pp)return snprintf (buff, len,"%s" ,"--" ); } +static int +snprint_path_failures (char * buff,size_t len,const struct path * pp) +{ +return snprint_int (buff, len, pp->failcount); +} +struct multipath_data mpd[] = { {'n' ,"name" ,0 , snprint_name}, {'w' ,"uuid" ,0 , snprint_multipath_uuid},
@@ -680,6 +686,7 @@ struct path_data pd[] = { {'r', "target WWPN", 0, snprint_tgt_wwpn}, {'a', "host adapter", 0, snprint_host_adapter}, {'G', "foreign", 0, snprint_path_foreign}, + {'0', "failures", 0, snprint_path_failures}, {0, NULL, 0 , NULL} };
Signature · 1 line
2.7.4
Benjamin Marzinski
maintainerPATCH 2/2 multipathd: fix reservation_key check
mpath_pr_event_handle should exit if the reservation key is zero, not non-zero.
Signed-off-by Benjamin Marzinski <[email protected]>
--- multipathd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
multipathd/main.c +1 -1
@@ -3136,7 +3136,7 @@ int mpath_pr_event_handle(struct path *pp) mpp = pp->mpp; -if (get_be64 (mpp->reservation_key)) +if (!get_be64 (mpp->reservation_key))return -1 ;pthread_attr_init (&attr);
Signature · 1 line
2.7.4