[DLM] PATCH 2/3 dlm: lowcomms close
When a node is removed from a lockspace configuration, close our connection to it, clearing any remaining messages for it. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
committed by
Steven Whitehouse
parent
ae118962b9
commit
1c032c0311
@@ -1063,6 +1063,27 @@ static void dealloc_nodeinfo(void)
|
||||
}
|
||||
}
|
||||
|
||||
int dlm_lowcomms_close(int nodeid)
|
||||
{
|
||||
struct nodeinfo *ni;
|
||||
|
||||
ni = nodeid2nodeinfo(nodeid, 0);
|
||||
if (!ni)
|
||||
return -1;
|
||||
|
||||
spin_lock(&ni->lock);
|
||||
if (ni->assoc_id) {
|
||||
ni->assoc_id = 0;
|
||||
/* Don't send shutdown here, sctp will just queue it
|
||||
till the node comes back up! */
|
||||
}
|
||||
spin_unlock(&ni->lock);
|
||||
|
||||
clean_one_writequeue(ni);
|
||||
clear_bit(NI_INIT_PENDING, &ni->flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int write_list_empty(void)
|
||||
{
|
||||
int status;
|
||||
|
Reference in New Issue
Block a user