Lines Matching refs:opt
269 void ceph_destroy_options(struct ceph_options *opt) in ceph_destroy_options() argument
271 dout("destroy_options %p\n", opt); in ceph_destroy_options()
272 kfree(opt->name); in ceph_destroy_options()
273 if (opt->key) { in ceph_destroy_options()
274 ceph_crypto_key_destroy(opt->key); in ceph_destroy_options()
275 kfree(opt->key); in ceph_destroy_options()
277 kfree(opt->mon_addr); in ceph_destroy_options()
278 kfree(opt); in ceph_destroy_options()
333 struct ceph_options *opt; in ceph_parse_options() local
341 opt = kzalloc(sizeof(*opt), GFP_KERNEL); in ceph_parse_options()
342 if (!opt) in ceph_parse_options()
344 opt->mon_addr = kcalloc(CEPH_MAX_MON, sizeof(*opt->mon_addr), in ceph_parse_options()
346 if (!opt->mon_addr) in ceph_parse_options()
349 dout("parse_options %p options '%s' dev_name '%s'\n", opt, options, in ceph_parse_options()
353 opt->flags = CEPH_OPT_DEFAULT; in ceph_parse_options()
354 opt->osd_keepalive_timeout = CEPH_OSD_KEEPALIVE_DEFAULT; in ceph_parse_options()
355 opt->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT; /* seconds */ in ceph_parse_options()
356 opt->osd_idle_ttl = CEPH_OSD_IDLE_TTL_DEFAULT; /* seconds */ in ceph_parse_options()
360 err = ceph_parse_ips(dev_name, dev_name_end, opt->mon_addr, in ceph_parse_options()
361 CEPH_MAX_MON, &opt->num_mon); in ceph_parse_options()
399 &opt->my_addr, in ceph_parse_options()
403 opt->flags |= CEPH_OPT_MYIP; in ceph_parse_options()
407 err = parse_fsid(argstr[0].from, &opt->fsid); in ceph_parse_options()
409 opt->flags |= CEPH_OPT_FSID; in ceph_parse_options()
412 opt->name = kstrndup(argstr[0].from, in ceph_parse_options()
417 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_options()
418 if (!opt->key) { in ceph_parse_options()
422 err = ceph_crypto_key_unarmor(opt->key, argstr[0].from); in ceph_parse_options()
427 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_options()
428 if (!opt->key) { in ceph_parse_options()
432 err = get_secret(opt->key, argstr[0].from); in ceph_parse_options()
442 opt->osd_keepalive_timeout = intval; in ceph_parse_options()
445 opt->osd_idle_ttl = intval; in ceph_parse_options()
448 opt->mount_timeout = intval; in ceph_parse_options()
452 opt->flags &= ~CEPH_OPT_NOSHARE; in ceph_parse_options()
455 opt->flags |= CEPH_OPT_NOSHARE; in ceph_parse_options()
459 opt->flags &= ~CEPH_OPT_NOCRC; in ceph_parse_options()
462 opt->flags |= CEPH_OPT_NOCRC; in ceph_parse_options()
466 opt->flags &= ~CEPH_OPT_NOMSGAUTH; in ceph_parse_options()
469 opt->flags |= CEPH_OPT_NOMSGAUTH; in ceph_parse_options()
473 opt->flags |= CEPH_OPT_TCP_NODELAY; in ceph_parse_options()
476 opt->flags &= ~CEPH_OPT_TCP_NODELAY; in ceph_parse_options()
485 return opt; in ceph_parse_options()
488 ceph_destroy_options(opt); in ceph_parse_options()
495 struct ceph_options *opt = client->options; in ceph_print_client_options() local
498 if (opt->name) { in ceph_print_client_options()
500 seq_escape(m, opt->name, ", \t\n\\"); in ceph_print_client_options()
503 if (opt->key) in ceph_print_client_options()
506 if (opt->flags & CEPH_OPT_FSID) in ceph_print_client_options()
507 seq_printf(m, "fsid=%pU,", &opt->fsid); in ceph_print_client_options()
508 if (opt->flags & CEPH_OPT_NOSHARE) in ceph_print_client_options()
510 if (opt->flags & CEPH_OPT_NOCRC) in ceph_print_client_options()
512 if (opt->flags & CEPH_OPT_NOMSGAUTH) in ceph_print_client_options()
514 if ((opt->flags & CEPH_OPT_TCP_NODELAY) == 0) in ceph_print_client_options()
517 if (opt->mount_timeout != CEPH_MOUNT_TIMEOUT_DEFAULT) in ceph_print_client_options()
518 seq_printf(m, "mount_timeout=%d,", opt->mount_timeout); in ceph_print_client_options()
519 if (opt->osd_idle_ttl != CEPH_OSD_IDLE_TTL_DEFAULT) in ceph_print_client_options()
520 seq_printf(m, "osd_idle_ttl=%d,", opt->osd_idle_ttl); in ceph_print_client_options()
521 if (opt->osd_keepalive_timeout != CEPH_OSD_KEEPALIVE_DEFAULT) in ceph_print_client_options()
523 opt->osd_keepalive_timeout); in ceph_print_client_options()
542 struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private, in ceph_create_client() argument
555 client->options = opt; in ceph_create_client()