Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46919
b: refs/heads/master
c: 0dd8214
h: refs/heads/master
i:
  46917: 3aebee9
  46915: 13f6ab2
  46911: 668e557
v: v3
  • Loading branch information
Sunil Mushran authored and Mark Fasheh committed Feb 7, 2007
1 parent 9dc1791 commit fd75b48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4968476a9bc5a6b30076076b4f3ce3e692e0d79
refs/heads/master: 0dd82141b236ce36253e3056c6068ee3d5732196
14 changes: 13 additions & 1 deletion trunk/fs/ocfs2/dlm/dlmdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,8 @@ static int dlm_register_domain_handlers(struct dlm_ctxt *dlm)
static int dlm_join_domain(struct dlm_ctxt *dlm)
{
int status;
unsigned int backoff;
unsigned int total_backoff = 0;

BUG_ON(!dlm);

Expand Down Expand Up @@ -1295,18 +1297,27 @@ static int dlm_join_domain(struct dlm_ctxt *dlm)
}

do {
unsigned int backoff;
status = dlm_try_to_join_domain(dlm);

/* If we're racing another node to the join, then we
* need to back off temporarily and let them
* complete. */
#define DLM_JOIN_TIMEOUT_MSECS 90000
if (status == -EAGAIN) {
if (signal_pending(current)) {
status = -ERESTARTSYS;
goto bail;
}

if (total_backoff >
msecs_to_jiffies(DLM_JOIN_TIMEOUT_MSECS)) {
status = -ERESTARTSYS;
mlog(ML_NOTICE, "Timed out joining dlm domain "
"%s after %u msecs\n", dlm->name,
jiffies_to_msecs(total_backoff));
goto bail;
}

/*
* <chip> After you!
* <dale> No, after you!
Expand All @@ -1316,6 +1327,7 @@ static int dlm_join_domain(struct dlm_ctxt *dlm)
*/
backoff = (unsigned int)(jiffies & 0x3);
backoff *= DLM_DOMAIN_BACKOFF_MS;
total_backoff += backoff;
mlog(0, "backoff %d\n", backoff);
msleep(backoff);
}
Expand Down

0 comments on commit fd75b48

Please sign in to comment.