Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188711
b: refs/heads/master
c: 91e45ce
h: refs/heads/master
i:
  188709: 5cbc22c
  188707: b4ab6d5
  188703: f730de5
v: v3
  • Loading branch information
Sage Weil committed Feb 17, 2010
1 parent 66ad732 commit f1f7363
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: e2663ab60de59d20fa33da3528f6d5359f8eb003
refs/heads/master: 91e45ce38946a8efa21fefbc65d023ca3c0b434f
7 changes: 5 additions & 2 deletions trunk/fs/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ void ceph_con_close(struct ceph_connection *con)
clear_bit(STANDBY, &con->state); /* avoid connect_seq bump */
mutex_lock(&con->mutex);
reset_connection(con);
cancel_delayed_work(&con->work);
mutex_unlock(&con->mutex);
queue_con(con);
}
Expand Down Expand Up @@ -1841,6 +1842,8 @@ static void ceph_fault(struct ceph_connection *con)
clear_bit(BUSY, &con->state); /* to avoid an improbable race */

mutex_lock(&con->mutex);
if (test_bit(CLOSED, &con->state))
goto out_unlock;

con_close_socket(con);

Expand Down Expand Up @@ -1876,15 +1879,15 @@ static void ceph_fault(struct ceph_connection *con)
else if (con->delay < MAX_DELAY_INTERVAL)
con->delay *= 2;

mutex_unlock(&con->mutex);

/* explicitly schedule work to try to reconnect again later. */
dout("fault queueing %p delay %lu\n", con, con->delay);
con->ops->get(con);
if (queue_delayed_work(ceph_msgr_wq, &con->work,
round_jiffies_relative(con->delay)) == 0)
con->ops->put(con);

out_unlock:
mutex_unlock(&con->mutex);
out:
if (con->ops->fault)
con->ops->fault(con);
Expand Down

0 comments on commit f1f7363

Please sign in to comment.