]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
staging: lustre: Use lnet_is_route_alive for router aliveness
authorChris Horn <hornc@cray.com>
Mon, 22 Feb 2016 22:29:24 +0000 (17:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Feb 2016 02:05:49 +0000 (18:05 -0800)
lctl show_route and lctl route_list will output router aliveness
information via lnet_get_route(). lnet_get_route() should use the
lnet_is_route_alive() function, introduced in e8a1124
http://review.whamcloud.com/7857, to determine route aliveness.

Signed-off-by: Chris Horn <hornc@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5733
Reviewed-on: http://review.whamcloud.com/14055
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/router.c

index 198ff03156c1d3f41a7653b6f7d2bbd200625935..5a6086b0069ca91606eaea8c02074d7ba00933bd 100644 (file)
@@ -607,8 +607,7 @@ lnet_get_route(int idx, __u32 *net, __u32 *hops,
                                        *hops     = route->lr_hops;
                                        *priority = route->lr_priority;
                                        *gateway  = route->lr_gateway->lp_nid;
-                                       *alive = route->lr_gateway->lp_alive &&
-                                                !route->lr_downis;
+                                       *alive = lnet_is_route_alive(route);
                                        lnet_net_unlock(cpt);
                                        return 0;
                                }