]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: delay delete of link when failover is needed
authorJon Paul Maloy <jon.maloy@ericsson.com>
Thu, 13 Feb 2014 22:29:16 +0000 (17:29 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Feb 2014 22:57:07 +0000 (17:57 -0500)
commit0a48e4d6eaf7d8e7e3cb1876ed34638421157e94
treeebc054f8e172f038efd53cd977e78eb1ac3f78e6
parent2f0d77c8c769c8f212051593a8735d58ca5eeb66
tipc: delay delete of link when failover is needed

When a bearer is disabled, all its attached links are deleted.
Ideally, we should do link failover to redundant links on other bearers,
if there are any, in such cases. This would be consistent with current
behavior when a link is reset, but not deleted. However, due to the
complexity involved, and the (wrongly) perceived low demand for this
feature, it was never implemented until now.

We mark the doomed link for deletion with a new flag, but wait until the
failover process is finished before we actually delete it. With the
improved link tunnelling/failover code introduced earlier in this commit
series, it is now easy to identify a spot in the code where the failover
is finished and it is safe to delete the marked link. Moreover, the test
for the flag and the deletion can be done synchronously, and outside the
most time critical data path.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/bearer.c
net/tipc/link.c
net/tipc/link.h
net/tipc/node.c