blob: 8e74e8c5a774ded4721a709a14657b134df72d4d [file] [log] [blame]
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -07001
2#include <linux/ceph/ceph_debug.h>
3#include <linux/backing-dev.h>
4#include <linux/ctype.h>
5#include <linux/fs.h>
6#include <linux/inet.h>
7#include <linux/in6.h>
Tommi Virtanene2c3d292011-03-25 16:40:48 -07008#include <linux/key.h>
Tommi Virtanen4b2a58a2011-03-28 14:59:38 -07009#include <keys/ceph-type.h>
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -070010#include <linux/module.h>
11#include <linux/mount.h>
12#include <linux/parser.h>
13#include <linux/sched.h>
14#include <linux/seq_file.h>
15#include <linux/slab.h>
16#include <linux/statfs.h>
17#include <linux/string.h>
18
19
20#include <linux/ceph/libceph.h>
21#include <linux/ceph/debugfs.h>
22#include <linux/ceph/decode.h>
23#include <linux/ceph/mon_client.h>
24#include <linux/ceph/auth.h>
Tommi Virtanen8323c3a2011-03-25 16:32:57 -070025#include "crypto.h"
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -070026
27
28
29/*
30 * find filename portion of a path (/foo/bar/baz -> baz)
31 */
32const char *ceph_file_part(const char *s, int len)
33{
34 const char *e = s + len;
35
36 while (e != s && *(e-1) != '/')
37 e--;
38 return e;
39}
40EXPORT_SYMBOL(ceph_file_part);
41
42const char *ceph_msg_type_name(int type)
43{
44 switch (type) {
45 case CEPH_MSG_SHUTDOWN: return "shutdown";
46 case CEPH_MSG_PING: return "ping";
47 case CEPH_MSG_AUTH: return "auth";
48 case CEPH_MSG_AUTH_REPLY: return "auth_reply";
49 case CEPH_MSG_MON_MAP: return "mon_map";
50 case CEPH_MSG_MON_GET_MAP: return "mon_get_map";
51 case CEPH_MSG_MON_SUBSCRIBE: return "mon_subscribe";
52 case CEPH_MSG_MON_SUBSCRIBE_ACK: return "mon_subscribe_ack";
53 case CEPH_MSG_STATFS: return "statfs";
54 case CEPH_MSG_STATFS_REPLY: return "statfs_reply";
55 case CEPH_MSG_MDS_MAP: return "mds_map";
56 case CEPH_MSG_CLIENT_SESSION: return "client_session";
57 case CEPH_MSG_CLIENT_RECONNECT: return "client_reconnect";
58 case CEPH_MSG_CLIENT_REQUEST: return "client_request";
59 case CEPH_MSG_CLIENT_REQUEST_FORWARD: return "client_request_forward";
60 case CEPH_MSG_CLIENT_REPLY: return "client_reply";
61 case CEPH_MSG_CLIENT_CAPS: return "client_caps";
62 case CEPH_MSG_CLIENT_CAPRELEASE: return "client_cap_release";
63 case CEPH_MSG_CLIENT_SNAP: return "client_snap";
64 case CEPH_MSG_CLIENT_LEASE: return "client_lease";
65 case CEPH_MSG_OSD_MAP: return "osd_map";
66 case CEPH_MSG_OSD_OP: return "osd_op";
67 case CEPH_MSG_OSD_OPREPLY: return "osd_opreply";
Yehuda Sadeha40c4f12011-03-21 15:07:16 -070068 case CEPH_MSG_WATCH_NOTIFY: return "watch_notify";
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -070069 default: return "unknown";
70 }
71}
72EXPORT_SYMBOL(ceph_msg_type_name);
73
74/*
75 * Initially learn our fsid, or verify an fsid matches.
76 */
77int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid)
78{
79 if (client->have_fsid) {
80 if (ceph_fsid_compare(&client->fsid, fsid)) {
81 pr_err("bad fsid, had %pU got %pU",
82 &client->fsid, fsid);
83 return -1;
84 }
85 } else {
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -070086 memcpy(&client->fsid, fsid, sizeof(*fsid));
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -070087 }
88 return 0;
89}
90EXPORT_SYMBOL(ceph_check_fsid);
91
92static int strcmp_null(const char *s1, const char *s2)
93{
94 if (!s1 && !s2)
95 return 0;
96 if (s1 && !s2)
97 return -1;
98 if (!s1 && s2)
99 return 1;
100 return strcmp(s1, s2);
101}
102
103int ceph_compare_options(struct ceph_options *new_opt,
104 struct ceph_client *client)
105{
106 struct ceph_options *opt1 = new_opt;
107 struct ceph_options *opt2 = client->options;
108 int ofs = offsetof(struct ceph_options, mon_addr);
109 int i;
110 int ret;
111
112 ret = memcmp(opt1, opt2, ofs);
113 if (ret)
114 return ret;
115
116 ret = strcmp_null(opt1->name, opt2->name);
117 if (ret)
118 return ret;
119
Tommi Virtanen8323c3a2011-03-25 16:32:57 -0700120 if (opt1->key && !opt2->key)
121 return -1;
122 if (!opt1->key && opt2->key)
123 return 1;
124 if (opt1->key && opt2->key) {
125 if (opt1->key->type != opt2->key->type)
126 return -1;
127 if (opt1->key->created.tv_sec != opt2->key->created.tv_sec)
128 return -1;
129 if (opt1->key->created.tv_nsec != opt2->key->created.tv_nsec)
130 return -1;
131 if (opt1->key->len != opt2->key->len)
132 return -1;
133 if (opt1->key->key && !opt2->key->key)
134 return -1;
135 if (!opt1->key->key && opt2->key->key)
136 return 1;
137 if (opt1->key->key && opt2->key->key) {
138 ret = memcmp(opt1->key->key, opt2->key->key, opt1->key->len);
139 if (ret)
140 return ret;
141 }
142 }
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700143
144 /* any matching mon ip implies a match */
145 for (i = 0; i < opt1->num_mon; i++) {
146 if (ceph_monmap_contains(client->monc.monmap,
147 &opt1->mon_addr[i]))
148 return 0;
149 }
150 return -1;
151}
152EXPORT_SYMBOL(ceph_compare_options);
153
154
155static int parse_fsid(const char *str, struct ceph_fsid *fsid)
156{
157 int i = 0;
158 char tmp[3];
159 int err = -EINVAL;
160 int d;
161
162 dout("parse_fsid '%s'\n", str);
163 tmp[2] = 0;
164 while (*str && i < 16) {
165 if (ispunct(*str)) {
166 str++;
167 continue;
168 }
169 if (!isxdigit(str[0]) || !isxdigit(str[1]))
170 break;
171 tmp[0] = str[0];
172 tmp[1] = str[1];
173 if (sscanf(tmp, "%x", &d) < 1)
174 break;
175 fsid->fsid[i] = d & 0xff;
176 i++;
177 str += 2;
178 }
179
180 if (i == 16)
181 err = 0;
182 dout("parse_fsid ret %d got fsid %pU", err, fsid);
183 return err;
184}
185
186/*
187 * ceph options
188 */
189enum {
190 Opt_osdtimeout,
191 Opt_osdkeepalivetimeout,
192 Opt_mount_timeout,
193 Opt_osd_idle_ttl,
194 Opt_last_int,
195 /* int args above */
196 Opt_fsid,
197 Opt_name,
198 Opt_secret,
Tommi Virtanene2c3d292011-03-25 16:40:48 -0700199 Opt_key,
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700200 Opt_ip,
201 Opt_last_string,
202 /* string args above */
Alex Eldercffaba12012-02-15 07:43:54 -0600203 Opt_share,
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700204 Opt_noshare,
Alex Eldercffaba12012-02-15 07:43:54 -0600205 Opt_crc,
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700206 Opt_nocrc,
207};
208
209static match_table_t opt_tokens = {
210 {Opt_osdtimeout, "osdtimeout=%d"},
211 {Opt_osdkeepalivetimeout, "osdkeepalive=%d"},
212 {Opt_mount_timeout, "mount_timeout=%d"},
213 {Opt_osd_idle_ttl, "osd_idle_ttl=%d"},
214 /* int args above */
215 {Opt_fsid, "fsid=%s"},
216 {Opt_name, "name=%s"},
217 {Opt_secret, "secret=%s"},
Tommi Virtanene2c3d292011-03-25 16:40:48 -0700218 {Opt_key, "key=%s"},
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700219 {Opt_ip, "ip=%s"},
220 /* string args above */
Alex Eldercffaba12012-02-15 07:43:54 -0600221 {Opt_share, "share"},
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700222 {Opt_noshare, "noshare"},
Alex Eldercffaba12012-02-15 07:43:54 -0600223 {Opt_crc, "crc"},
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700224 {Opt_nocrc, "nocrc"},
225 {-1, NULL}
226};
227
228void ceph_destroy_options(struct ceph_options *opt)
229{
230 dout("destroy_options %p\n", opt);
231 kfree(opt->name);
Tommi Virtanen8323c3a2011-03-25 16:32:57 -0700232 if (opt->key) {
233 ceph_crypto_key_destroy(opt->key);
234 kfree(opt->key);
235 }
Noah Watkins1cad7892011-09-12 14:51:53 -0700236 kfree(opt->mon_addr);
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700237 kfree(opt);
238}
239EXPORT_SYMBOL(ceph_destroy_options);
240
Tommi Virtanene2c3d292011-03-25 16:40:48 -0700241/* get secret from key store */
242static int get_secret(struct ceph_crypto_key *dst, const char *name) {
243 struct key *ukey;
244 int key_err;
245 int err = 0;
Tommi Virtanen4b2a58a2011-03-28 14:59:38 -0700246 struct ceph_crypto_key *ckey;
Tommi Virtanene2c3d292011-03-25 16:40:48 -0700247
Tommi Virtanen4b2a58a2011-03-28 14:59:38 -0700248 ukey = request_key(&key_type_ceph, name, NULL);
Tommi Virtanene2c3d292011-03-25 16:40:48 -0700249 if (!ukey || IS_ERR(ukey)) {
250 /* request_key errors don't map nicely to mount(2)
251 errors; don't even try, but still printk */
252 key_err = PTR_ERR(ukey);
253 switch (key_err) {
254 case -ENOKEY:
255 pr_warning("ceph: Mount failed due to key not found: %s\n", name);
256 break;
257 case -EKEYEXPIRED:
258 pr_warning("ceph: Mount failed due to expired key: %s\n", name);
259 break;
260 case -EKEYREVOKED:
261 pr_warning("ceph: Mount failed due to revoked key: %s\n", name);
262 break;
263 default:
264 pr_warning("ceph: Mount failed due to unknown key error"
265 " %d: %s\n", key_err, name);
266 }
267 err = -EPERM;
268 goto out;
269 }
270
Tommi Virtanen4b2a58a2011-03-28 14:59:38 -0700271 ckey = ukey->payload.data;
272 err = ceph_crypto_key_clone(dst, ckey);
Tommi Virtanene2c3d292011-03-25 16:40:48 -0700273 if (err)
274 goto out_key;
275 /* pass through, err is 0 */
276
277out_key:
278 key_put(ukey);
279out:
280 return err;
281}
282
Alex Elderee577412012-01-24 10:08:36 -0600283struct ceph_options *
284ceph_parse_options(char *options, const char *dev_name,
285 const char *dev_name_end,
286 int (*parse_extra_token)(char *c, void *private),
287 void *private)
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700288{
289 struct ceph_options *opt;
290 const char *c;
291 int err = -ENOMEM;
292 substring_t argstr[MAX_OPT_ARGS];
293
294 opt = kzalloc(sizeof(*opt), GFP_KERNEL);
295 if (!opt)
Alex Elderee577412012-01-24 10:08:36 -0600296 return ERR_PTR(-ENOMEM);
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700297 opt->mon_addr = kcalloc(CEPH_MAX_MON, sizeof(*opt->mon_addr),
298 GFP_KERNEL);
299 if (!opt->mon_addr)
300 goto out;
301
302 dout("parse_options %p options '%s' dev_name '%s'\n", opt, options,
303 dev_name);
304
305 /* start with defaults */
306 opt->flags = CEPH_OPT_DEFAULT;
307 opt->osd_timeout = CEPH_OSD_TIMEOUT_DEFAULT;
308 opt->osd_keepalive_timeout = CEPH_OSD_KEEPALIVE_DEFAULT;
309 opt->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT; /* seconds */
310 opt->osd_idle_ttl = CEPH_OSD_IDLE_TTL_DEFAULT; /* seconds */
311
312 /* get mon ip(s) */
313 /* ip1[:port1][,ip2[:port2]...] */
314 err = ceph_parse_ips(dev_name, dev_name_end, opt->mon_addr,
315 CEPH_MAX_MON, &opt->num_mon);
316 if (err < 0)
317 goto out;
318
319 /* parse mount options */
320 while ((c = strsep(&options, ",")) != NULL) {
321 int token, intval, ret;
322 if (!*c)
323 continue;
324 err = -EINVAL;
325 token = match_token((char *)c, opt_tokens, argstr);
Yehuda Sadeh010e3b42010-09-30 11:58:31 -0700326 if (token < 0 && parse_extra_token) {
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700327 /* extra? */
328 err = parse_extra_token((char *)c, private);
329 if (err < 0) {
330 pr_err("bad option at '%s'\n", c);
331 goto out;
332 }
333 continue;
334 }
335 if (token < Opt_last_int) {
336 ret = match_int(&argstr[0], &intval);
337 if (ret < 0) {
338 pr_err("bad mount option arg (not int) "
339 "at '%s'\n", c);
340 continue;
341 }
342 dout("got int token %d val %d\n", token, intval);
343 } else if (token > Opt_last_int && token < Opt_last_string) {
344 dout("got string token %d val %s\n", token,
345 argstr[0].from);
346 } else {
347 dout("got token %d\n", token);
348 }
349 switch (token) {
350 case Opt_ip:
351 err = ceph_parse_ips(argstr[0].from,
352 argstr[0].to,
353 &opt->my_addr,
354 1, NULL);
355 if (err < 0)
356 goto out;
357 opt->flags |= CEPH_OPT_MYIP;
358 break;
359
360 case Opt_fsid:
361 err = parse_fsid(argstr[0].from, &opt->fsid);
362 if (err == 0)
363 opt->flags |= CEPH_OPT_FSID;
364 break;
365 case Opt_name:
366 opt->name = kstrndup(argstr[0].from,
367 argstr[0].to-argstr[0].from,
368 GFP_KERNEL);
369 break;
370 case Opt_secret:
Tommi Virtanen8323c3a2011-03-25 16:32:57 -0700371 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL);
372 if (!opt->key) {
373 err = -ENOMEM;
374 goto out;
375 }
376 err = ceph_crypto_key_unarmor(opt->key, argstr[0].from);
377 if (err < 0)
378 goto out;
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700379 break;
Tommi Virtanene2c3d292011-03-25 16:40:48 -0700380 case Opt_key:
381 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL);
382 if (!opt->key) {
383 err = -ENOMEM;
384 goto out;
385 }
386 err = get_secret(opt->key, argstr[0].from);
387 if (err < 0)
388 goto out;
389 break;
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700390
391 /* misc */
392 case Opt_osdtimeout:
393 opt->osd_timeout = intval;
394 break;
395 case Opt_osdkeepalivetimeout:
396 opt->osd_keepalive_timeout = intval;
397 break;
398 case Opt_osd_idle_ttl:
399 opt->osd_idle_ttl = intval;
400 break;
401 case Opt_mount_timeout:
402 opt->mount_timeout = intval;
403 break;
404
Alex Eldercffaba12012-02-15 07:43:54 -0600405 case Opt_share:
406 opt->flags &= ~CEPH_OPT_NOSHARE;
407 break;
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700408 case Opt_noshare:
409 opt->flags |= CEPH_OPT_NOSHARE;
410 break;
411
Alex Eldercffaba12012-02-15 07:43:54 -0600412 case Opt_crc:
413 opt->flags &= ~CEPH_OPT_NOCRC;
414 break;
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700415 case Opt_nocrc:
416 opt->flags |= CEPH_OPT_NOCRC;
417 break;
418
419 default:
420 BUG_ON(token);
421 }
422 }
423
424 /* success */
Alex Elderee577412012-01-24 10:08:36 -0600425 return opt;
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700426
427out:
428 ceph_destroy_options(opt);
Alex Elderee577412012-01-24 10:08:36 -0600429 return ERR_PTR(err);
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700430}
431EXPORT_SYMBOL(ceph_parse_options);
432
433u64 ceph_client_id(struct ceph_client *client)
434{
435 return client->monc.auth->global_id;
436}
437EXPORT_SYMBOL(ceph_client_id);
438
439/*
440 * create a fresh client instance
441 */
Sage Weil6ab00d42011-08-09 09:41:59 -0700442struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private,
443 unsigned supported_features,
444 unsigned required_features)
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700445{
446 struct ceph_client *client;
Sage Weil6ab00d42011-08-09 09:41:59 -0700447 struct ceph_entity_addr *myaddr = NULL;
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700448 int err = -ENOMEM;
449
450 client = kzalloc(sizeof(*client), GFP_KERNEL);
451 if (client == NULL)
452 return ERR_PTR(-ENOMEM);
453
454 client->private = private;
455 client->options = opt;
456
457 mutex_init(&client->mount_mutex);
458 init_waitqueue_head(&client->auth_wq);
459 client->auth_err = 0;
460
461 client->extra_mon_dispatch = NULL;
Sage Weil6ab00d42011-08-09 09:41:59 -0700462 client->supported_features = CEPH_FEATURE_SUPPORTED_DEFAULT |
463 supported_features;
464 client->required_features = CEPH_FEATURE_REQUIRED_DEFAULT |
465 required_features;
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700466
Sage Weil6ab00d42011-08-09 09:41:59 -0700467 /* msgr */
468 if (ceph_test_opt(client, MYIP))
469 myaddr = &client->options->my_addr;
Alex Elderd910c112012-05-26 23:26:43 -0500470 ceph_messenger_init(&client->msgr, myaddr,
471 client->supported_features,
472 client->required_features,
473 ceph_test_opt(client, NOCRC));
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700474
475 /* subsystems */
476 err = ceph_monc_init(&client->monc, client);
477 if (err < 0)
Alex Elderd910c112012-05-26 23:26:43 -0500478 goto fail;
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700479 err = ceph_osdc_init(&client->osdc, client);
480 if (err < 0)
481 goto fail_monc;
482
483 return client;
484
485fail_monc:
486 ceph_monc_stop(&client->monc);
487fail:
488 kfree(client);
489 return ERR_PTR(err);
490}
491EXPORT_SYMBOL(ceph_create_client);
492
493void ceph_destroy_client(struct ceph_client *client)
494{
495 dout("destroy_client %p\n", client);
496
Guanjun He59d02722012-07-08 19:50:33 -0700497 atomic_set(&client->msgr.stopping, 1);
498
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700499 /* unmount */
500 ceph_osdc_stop(&client->osdc);
501
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700502 ceph_monc_stop(&client->monc);
503
504 ceph_debugfs_client_cleanup(client);
505
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700506 ceph_destroy_options(client->options);
507
508 kfree(client);
509 dout("destroy_client %p done\n", client);
510}
511EXPORT_SYMBOL(ceph_destroy_client);
512
513/*
514 * true if we have the mon map (and have thus joined the cluster)
515 */
516static int have_mon_and_osd_map(struct ceph_client *client)
517{
518 return client->monc.monmap && client->monc.monmap->epoch &&
519 client->osdc.osdmap && client->osdc.osdmap->epoch;
520}
521
522/*
523 * mount: join the ceph cluster, and open root directory.
524 */
525int __ceph_open_session(struct ceph_client *client, unsigned long started)
526{
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700527 int err;
528 unsigned long timeout = client->options->mount_timeout * HZ;
529
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700530 /* open session, and wait for mon and osd maps */
531 err = ceph_monc_open_session(&client->monc);
532 if (err < 0)
533 return err;
534
535 while (!have_mon_and_osd_map(client)) {
536 err = -EIO;
537 if (timeout && time_after_eq(jiffies, started + timeout))
538 return err;
539
540 /* wait */
541 dout("mount waiting for mon_map\n");
542 err = wait_event_interruptible_timeout(client->auth_wq,
543 have_mon_and_osd_map(client) || (client->auth_err < 0),
544 timeout);
545 if (err == -EINTR || err == -ERESTARTSYS)
546 return err;
547 if (client->auth_err < 0)
548 return client->auth_err;
549 }
550
551 return 0;
552}
553EXPORT_SYMBOL(__ceph_open_session);
554
555
556int ceph_open_session(struct ceph_client *client)
557{
558 int ret;
559 unsigned long started = jiffies; /* note the start time */
560
561 dout("open_session start\n");
562 mutex_lock(&client->mount_mutex);
563
564 ret = __ceph_open_session(client, started);
565
566 mutex_unlock(&client->mount_mutex);
567 return ret;
568}
569EXPORT_SYMBOL(ceph_open_session);
570
571
572static int __init init_ceph_lib(void)
573{
574 int ret = 0;
575
576 ret = ceph_debugfs_init();
577 if (ret < 0)
578 goto out;
579
Tommi Virtanen4b2a58a2011-03-28 14:59:38 -0700580 ret = ceph_crypto_init();
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700581 if (ret < 0)
582 goto out_debugfs;
583
Tommi Virtanen4b2a58a2011-03-28 14:59:38 -0700584 ret = ceph_msgr_init();
585 if (ret < 0)
586 goto out_crypto;
587
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700588 pr_info("loaded (mon/osd proto %d/%d, osdmap %d/%d %d/%d)\n",
589 CEPH_MONC_PROTOCOL, CEPH_OSDC_PROTOCOL,
590 CEPH_OSDMAP_VERSION, CEPH_OSDMAP_VERSION_EXT,
591 CEPH_OSDMAP_INC_VERSION, CEPH_OSDMAP_INC_VERSION_EXT);
592
593 return 0;
594
Tommi Virtanen4b2a58a2011-03-28 14:59:38 -0700595out_crypto:
596 ceph_crypto_shutdown();
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700597out_debugfs:
598 ceph_debugfs_cleanup();
599out:
600 return ret;
601}
602
603static void __exit exit_ceph_lib(void)
604{
605 dout("exit_ceph_lib\n");
606 ceph_msgr_exit();
Tommi Virtanen4b2a58a2011-03-28 14:59:38 -0700607 ceph_crypto_shutdown();
Yehuda Sadeh3d14c5d2010-04-06 15:14:15 -0700608 ceph_debugfs_cleanup();
609}
610
611module_init(init_ceph_lib);
612module_exit(exit_ceph_lib);
613
614MODULE_AUTHOR("Sage Weil <sage@newdream.net>");
615MODULE_AUTHOR("Yehuda Sadeh <yehuda@hq.newdream.net>");
616MODULE_AUTHOR("Patience Warnick <patience@newdream.net>");
617MODULE_DESCRIPTION("Ceph filesystem for Linux");
618MODULE_LICENSE("GPL");