diff options
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/ceph_common.c | 7 | ||||
-rw-r--r-- | net/ceph/messenger.c | 4 | ||||
-rw-r--r-- | net/ceph/mon_client.c | 8 | ||||
-rw-r--r-- | net/ceph/osd_client.c | 12 |
4 files changed, 18 insertions, 13 deletions
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index a776f751edbf..ba4323bce0e9 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c | |||
@@ -504,13 +504,6 @@ void ceph_destroy_client(struct ceph_client *client) | |||
504 | /* unmount */ | 504 | /* unmount */ |
505 | ceph_osdc_stop(&client->osdc); | 505 | ceph_osdc_stop(&client->osdc); |
506 | 506 | ||
507 | /* | ||
508 | * make sure osd connections close out before destroying the | ||
509 | * auth module, which is needed to free those connections' | ||
510 | * ceph_authorizers. | ||
511 | */ | ||
512 | ceph_msgr_flush(); | ||
513 | |||
514 | ceph_monc_stop(&client->monc); | 507 | ceph_monc_stop(&client->monc); |
515 | 508 | ||
516 | ceph_debugfs_client_cleanup(client); | 509 | ceph_debugfs_client_cleanup(client); |
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 524f4e4f598b..b332c3d76059 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -563,6 +563,10 @@ static void prepare_write_message(struct ceph_connection *con) | |||
563 | m->hdr.seq = cpu_to_le64(++con->out_seq); | 563 | m->hdr.seq = cpu_to_le64(++con->out_seq); |
564 | m->needs_out_seq = false; | 564 | m->needs_out_seq = false; |
565 | } | 565 | } |
566 | #ifdef CONFIG_BLOCK | ||
567 | else | ||
568 | m->bio_iter = NULL; | ||
569 | #endif | ||
566 | 570 | ||
567 | dout("prepare_write_message %p seq %lld type %d len %d+%d+%d %d pgs\n", | 571 | dout("prepare_write_message %p seq %lld type %d len %d+%d+%d %d pgs\n", |
568 | m, con->out_seq, le16_to_cpu(m->hdr.type), | 572 | m, con->out_seq, le16_to_cpu(m->hdr.type), |
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index 10d6008d31f2..d0649a9655be 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c | |||
@@ -847,6 +847,14 @@ void ceph_monc_stop(struct ceph_mon_client *monc) | |||
847 | 847 | ||
848 | mutex_unlock(&monc->mutex); | 848 | mutex_unlock(&monc->mutex); |
849 | 849 | ||
850 | /* | ||
851 | * flush msgr queue before we destroy ourselves to ensure that: | ||
852 | * - any work that references our embedded con is finished. | ||
853 | * - any osd_client or other work that may reference an authorizer | ||
854 | * finishes before we shut down the auth subsystem. | ||
855 | */ | ||
856 | ceph_msgr_flush(); | ||
857 | |||
850 | ceph_auth_destroy(monc->auth); | 858 | ceph_auth_destroy(monc->auth); |
851 | 859 | ||
852 | ceph_msg_put(monc->m_auth); | 860 | ceph_msg_put(monc->m_auth); |
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 1ffebed5ce0f..ca59e66c9787 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -139,15 +139,15 @@ void ceph_osdc_release_request(struct kref *kref) | |||
139 | 139 | ||
140 | if (req->r_request) | 140 | if (req->r_request) |
141 | ceph_msg_put(req->r_request); | 141 | ceph_msg_put(req->r_request); |
142 | if (req->r_reply) | ||
143 | ceph_msg_put(req->r_reply); | ||
144 | if (req->r_con_filling_msg) { | 142 | if (req->r_con_filling_msg) { |
145 | dout("release_request revoking pages %p from con %p\n", | 143 | dout("release_request revoking pages %p from con %p\n", |
146 | req->r_pages, req->r_con_filling_msg); | 144 | req->r_pages, req->r_con_filling_msg); |
147 | ceph_con_revoke_message(req->r_con_filling_msg, | 145 | ceph_con_revoke_message(req->r_con_filling_msg, |
148 | req->r_reply); | 146 | req->r_reply); |
149 | ceph_con_put(req->r_con_filling_msg); | 147 | req->r_con_filling_msg->ops->put(req->r_con_filling_msg); |
150 | } | 148 | } |
149 | if (req->r_reply) | ||
150 | ceph_msg_put(req->r_reply); | ||
151 | if (req->r_own_pages) | 151 | if (req->r_own_pages) |
152 | ceph_release_page_vector(req->r_pages, | 152 | ceph_release_page_vector(req->r_pages, |
153 | req->r_num_pages); | 153 | req->r_num_pages); |
@@ -1216,7 +1216,7 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg, | |||
1216 | if (req->r_con_filling_msg == con && req->r_reply == msg) { | 1216 | if (req->r_con_filling_msg == con && req->r_reply == msg) { |
1217 | dout(" dropping con_filling_msg ref %p\n", con); | 1217 | dout(" dropping con_filling_msg ref %p\n", con); |
1218 | req->r_con_filling_msg = NULL; | 1218 | req->r_con_filling_msg = NULL; |
1219 | ceph_con_put(con); | 1219 | con->ops->put(con); |
1220 | } | 1220 | } |
1221 | 1221 | ||
1222 | if (!req->r_got_reply) { | 1222 | if (!req->r_got_reply) { |
@@ -2028,7 +2028,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con, | |||
2028 | dout("get_reply revoking msg %p from old con %p\n", | 2028 | dout("get_reply revoking msg %p from old con %p\n", |
2029 | req->r_reply, req->r_con_filling_msg); | 2029 | req->r_reply, req->r_con_filling_msg); |
2030 | ceph_con_revoke_message(req->r_con_filling_msg, req->r_reply); | 2030 | ceph_con_revoke_message(req->r_con_filling_msg, req->r_reply); |
2031 | ceph_con_put(req->r_con_filling_msg); | 2031 | req->r_con_filling_msg->ops->put(req->r_con_filling_msg); |
2032 | req->r_con_filling_msg = NULL; | 2032 | req->r_con_filling_msg = NULL; |
2033 | } | 2033 | } |
2034 | 2034 | ||
@@ -2063,7 +2063,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con, | |||
2063 | #endif | 2063 | #endif |
2064 | } | 2064 | } |
2065 | *skip = 0; | 2065 | *skip = 0; |
2066 | req->r_con_filling_msg = ceph_con_get(con); | 2066 | req->r_con_filling_msg = con->ops->get(con); |
2067 | dout("get_reply tid %lld %p\n", tid, m); | 2067 | dout("get_reply tid %lld %p\n", tid, m); |
2068 | 2068 | ||
2069 | out: | 2069 | out: |