diff options
author | David Teigland <teigland@redhat.com> | 2006-04-28 10:50:41 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-04-28 10:50:41 -0400 |
commit | 1c032c03117c014512195f2e33c3af999f132146 (patch) | |
tree | 2032d1965331fb1882fdb306c678cf4497b35c10 /fs/dlm/lowcomms.c | |
parent | ae118962b9f8572b5ff00e85c053dbeede2314db (diff) | |
download | kernel_samsung_smdk4412-1c032c03117c014512195f2e33c3af999f132146.zip kernel_samsung_smdk4412-1c032c03117c014512195f2e33c3af999f132146.tar.gz kernel_samsung_smdk4412-1c032c03117c014512195f2e33c3af999f132146.tar.bz2 |
[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>
Diffstat (limited to 'fs/dlm/lowcomms.c')
-rw-r--r-- | fs/dlm/lowcomms.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 09b0124..cdd168e 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -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; |