aboutsummaryrefslogtreecommitdiff
path: root/fs/dlm/member.c
diff options
context:
space:
mode:
authorChristine Caulfield <ccaulfie@redhat.com>2009-05-07 10:54:16 -0500
committerDavid Teigland <teigland@redhat.com>2009-05-15 09:34:12 -0500
commit391fbdc5d527149578490db2f1619951d91f3561 (patch)
tree98b84ba8cd459293a232fd148cef0886f976bf19 /fs/dlm/member.c
parent8511a2728ab82cab398e39d019f5cf1246021c1c (diff)
dlm: connect to nodes earlier
Make network connections to other nodes earlier, in the context of dlm_recoverd. This avoids connecting to nodes from dlm_send where we try to avoid allocations which could possibly deadlock if memory reclaim goes into the cluster fs which may try to do a dlm operation. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/member.c')
-rw-r--r--fs/dlm/member.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c
index 26133f05ae3..2afb77051cc 100644
--- a/fs/dlm/member.c
+++ b/fs/dlm/member.c
@@ -1,7 +1,7 @@
/******************************************************************************
*******************************************************************************
**
-** Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
+** Copyright (C) 2005-2009 Red Hat, Inc. All rights reserved.
**
** This copyrighted material is made available to anyone wishing to use,
** modify, copy, or redistribute it subject to the terms and conditions
@@ -17,6 +17,7 @@
#include "recover.h"
#include "rcom.h"
#include "config.h"
+#include "lowcomms.h"
static void add_ordered_member(struct dlm_ls *ls, struct dlm_member *new)
{
@@ -45,7 +46,7 @@ static void add_ordered_member(struct dlm_ls *ls, struct dlm_member *new)
static int dlm_add_member(struct dlm_ls *ls, int nodeid)
{
struct dlm_member *memb;
- int w;
+ int w, error;
memb = kzalloc(sizeof(struct dlm_member), GFP_KERNEL);
if (!memb)
@@ -57,6 +58,12 @@ static int dlm_add_member(struct dlm_ls *ls, int nodeid)
return w;
}
+ error = dlm_lowcomms_connect_node(nodeid);
+ if (error < 0) {
+ kfree(memb);
+ return error;
+ }
+
memb->nodeid = nodeid;
memb->weight = w;
add_ordered_member(ls, memb);