Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320309
b: refs/heads/master
c: a2a3258
h: refs/heads/master
i:
  320307: f659f67
v: v3
  • Loading branch information
Guanjun He authored and Sage Weil committed Jul 30, 2012
1 parent 34a5054 commit aeffe4c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a16cb1f70799c851410d9dca0a24122e258df06c
refs/heads/master: a2a3258417eb6a1799cf893350771428875a8287
1 change: 1 addition & 0 deletions trunk/include/linux/ceph/messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ struct ceph_messenger {
struct ceph_entity_inst inst; /* my name+address */
struct ceph_entity_addr my_enc_addr;

atomic_t stopping;
bool nocrc;

/*
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/ceph/ceph_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ void ceph_destroy_client(struct ceph_client *client)
{
dout("destroy_client %p\n", client);

atomic_set(&client->msgr.stopping, 1);

/* unmount */
ceph_osdc_stop(&client->osdc);

Expand Down
5 changes: 5 additions & 0 deletions trunk/net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ static void con_sock_state_closed(struct ceph_connection *con)
static void ceph_sock_data_ready(struct sock *sk, int count_unused)
{
struct ceph_connection *con = sk->sk_user_data;
if (atomic_read(&con->msgr->stopping)) {
return;
}

if (sk->sk_state != TCP_CLOSE_WAIT) {
dout("%s on %p state = %lu, queueing work\n", __func__,
Expand Down Expand Up @@ -2413,6 +2416,8 @@ void ceph_messenger_init(struct ceph_messenger *msgr,
encode_my_addr(msgr);
msgr->nocrc = nocrc;

atomic_set(&msgr->stopping, 0);

dout("%s %p\n", __func__, msgr);
}
EXPORT_SYMBOL(ceph_messenger_init);
Expand Down

0 comments on commit aeffe4c

Please sign in to comment.