From 8585594d7c9215e8878b67164e974516a176e271 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 29 May 2010 09:41:23 -0700 Subject: [PATCH] --- yaml --- r: 199320 b: refs/heads/master c: a922d38fd10d55d5033f10df15baf966e8f5b18c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ceph/messenger.c | 6 ++++++ trunk/fs/ceph/messenger.h | 1 + trunk/fs/ceph/super.c | 10 +++++++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 627d7a826554..3e270ffec681 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dd1c9057366f329911180e9000e2b425f23fc287 +refs/heads/master: a922d38fd10d55d5033f10df15baf966e8f5b18c diff --git a/trunk/fs/ceph/messenger.c b/trunk/fs/ceph/messenger.c index 60b74839ebec..64b8b1f7863d 100644 --- a/trunk/fs/ceph/messenger.c +++ b/trunk/fs/ceph/messenger.c @@ -120,6 +120,12 @@ void ceph_msgr_exit(void) destroy_workqueue(ceph_msgr_wq); } +void ceph_msgr_flush() +{ + flush_workqueue(ceph_msgr_wq); +} + + /* * socket callback functions */ diff --git a/trunk/fs/ceph/messenger.h b/trunk/fs/ceph/messenger.h index 00a9430b1ffc..76fbc957bc13 100644 --- a/trunk/fs/ceph/messenger.h +++ b/trunk/fs/ceph/messenger.h @@ -213,6 +213,7 @@ extern int ceph_parse_ips(const char *c, const char *end, extern int ceph_msgr_init(void); extern void ceph_msgr_exit(void); +extern void ceph_msgr_flush(void); extern struct ceph_messenger *ceph_messenger_create( struct ceph_entity_addr *myaddr); diff --git a/trunk/fs/ceph/super.c b/trunk/fs/ceph/super.c index 9b46bb951e1f..5cf6fba8b705 100644 --- a/trunk/fs/ceph/super.c +++ b/trunk/fs/ceph/super.c @@ -669,9 +669,17 @@ static void ceph_destroy_client(struct ceph_client *client) /* unmount */ ceph_mdsc_stop(&client->mdsc); - ceph_monc_stop(&client->monc); ceph_osdc_stop(&client->osdc); + /* + * make sure mds and osd connections close out before destroying + * the auth module, which is needed to free those connections' + * ceph_authorizers. + */ + ceph_msgr_flush(); + + ceph_monc_stop(&client->monc); + ceph_adjust_min_caps(-client->min_caps); ceph_debugfs_client_cleanup(client);