Lines Matching refs:opt
306 void ceph_destroy_options(struct ceph_options *opt) in ceph_destroy_options() argument
308 dout("destroy_options %p\n", opt); in ceph_destroy_options()
309 kfree(opt->name); in ceph_destroy_options()
310 if (opt->key) { in ceph_destroy_options()
311 ceph_crypto_key_destroy(opt->key); in ceph_destroy_options()
312 kfree(opt->key); in ceph_destroy_options()
314 kfree(opt->mon_addr); in ceph_destroy_options()
315 kfree(opt); in ceph_destroy_options()
370 struct ceph_options *opt; in ceph_parse_options() local
375 opt = kzalloc(sizeof(*opt), GFP_KERNEL); in ceph_parse_options()
376 if (!opt) in ceph_parse_options()
378 opt->mon_addr = kcalloc(CEPH_MAX_MON, sizeof(*opt->mon_addr), in ceph_parse_options()
380 if (!opt->mon_addr) in ceph_parse_options()
383 dout("parse_options %p options '%s' dev_name '%s'\n", opt, options, in ceph_parse_options()
387 opt->flags = CEPH_OPT_DEFAULT; in ceph_parse_options()
388 opt->osd_keepalive_timeout = CEPH_OSD_KEEPALIVE_DEFAULT; in ceph_parse_options()
389 opt->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT; in ceph_parse_options()
390 opt->osd_idle_ttl = CEPH_OSD_IDLE_TTL_DEFAULT; in ceph_parse_options()
391 opt->osd_request_timeout = CEPH_OSD_REQUEST_TIMEOUT_DEFAULT; in ceph_parse_options()
395 err = ceph_parse_ips(dev_name, dev_name_end, opt->mon_addr, in ceph_parse_options()
396 CEPH_MAX_MON, &opt->num_mon); in ceph_parse_options()
433 &opt->my_addr, in ceph_parse_options()
437 opt->flags |= CEPH_OPT_MYIP; in ceph_parse_options()
441 err = parse_fsid(argstr[0].from, &opt->fsid); in ceph_parse_options()
443 opt->flags |= CEPH_OPT_FSID; in ceph_parse_options()
446 kfree(opt->name); in ceph_parse_options()
447 opt->name = kstrndup(argstr[0].from, in ceph_parse_options()
450 if (!opt->name) { in ceph_parse_options()
456 ceph_crypto_key_destroy(opt->key); in ceph_parse_options()
457 kfree(opt->key); in ceph_parse_options()
459 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_options()
460 if (!opt->key) { in ceph_parse_options()
464 err = ceph_crypto_key_unarmor(opt->key, argstr[0].from); in ceph_parse_options()
469 ceph_crypto_key_destroy(opt->key); in ceph_parse_options()
470 kfree(opt->key); in ceph_parse_options()
472 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_options()
473 if (!opt->key) { in ceph_parse_options()
477 err = get_secret(opt->key, argstr[0].from); in ceph_parse_options()
493 opt->osd_keepalive_timeout = in ceph_parse_options()
503 opt->osd_idle_ttl = msecs_to_jiffies(intval * 1000); in ceph_parse_options()
512 opt->mount_timeout = msecs_to_jiffies(intval * 1000); in ceph_parse_options()
521 opt->osd_request_timeout = msecs_to_jiffies(intval * 1000); in ceph_parse_options()
525 opt->flags &= ~CEPH_OPT_NOSHARE; in ceph_parse_options()
528 opt->flags |= CEPH_OPT_NOSHARE; in ceph_parse_options()
532 opt->flags &= ~CEPH_OPT_NOCRC; in ceph_parse_options()
535 opt->flags |= CEPH_OPT_NOCRC; in ceph_parse_options()
539 opt->flags &= ~CEPH_OPT_NOMSGAUTH; in ceph_parse_options()
542 opt->flags |= CEPH_OPT_NOMSGAUTH; in ceph_parse_options()
545 opt->flags &= ~CEPH_OPT_NOMSGSIGN; in ceph_parse_options()
548 opt->flags |= CEPH_OPT_NOMSGSIGN; in ceph_parse_options()
552 opt->flags |= CEPH_OPT_TCP_NODELAY; in ceph_parse_options()
555 opt->flags &= ~CEPH_OPT_TCP_NODELAY; in ceph_parse_options()
559 opt->flags |= CEPH_OPT_ABORT_ON_FULL; in ceph_parse_options()
568 return opt; in ceph_parse_options()
571 ceph_destroy_options(opt); in ceph_parse_options()
579 struct ceph_options *opt = client->options; in ceph_print_client_options() local
582 if (opt->name) { in ceph_print_client_options()
584 seq_escape(m, opt->name, ", \t\n\\"); in ceph_print_client_options()
587 if (opt->key) in ceph_print_client_options()
590 if (opt->flags & CEPH_OPT_FSID) in ceph_print_client_options()
591 seq_printf(m, "fsid=%pU,", &opt->fsid); in ceph_print_client_options()
592 if (opt->flags & CEPH_OPT_NOSHARE) in ceph_print_client_options()
594 if (opt->flags & CEPH_OPT_NOCRC) in ceph_print_client_options()
596 if (opt->flags & CEPH_OPT_NOMSGAUTH) in ceph_print_client_options()
598 if (opt->flags & CEPH_OPT_NOMSGSIGN) in ceph_print_client_options()
600 if ((opt->flags & CEPH_OPT_TCP_NODELAY) == 0) in ceph_print_client_options()
602 if (show_all && (opt->flags & CEPH_OPT_ABORT_ON_FULL)) in ceph_print_client_options()
605 if (opt->mount_timeout != CEPH_MOUNT_TIMEOUT_DEFAULT) in ceph_print_client_options()
607 jiffies_to_msecs(opt->mount_timeout) / 1000); in ceph_print_client_options()
608 if (opt->osd_idle_ttl != CEPH_OSD_IDLE_TTL_DEFAULT) in ceph_print_client_options()
610 jiffies_to_msecs(opt->osd_idle_ttl) / 1000); in ceph_print_client_options()
611 if (opt->osd_keepalive_timeout != CEPH_OSD_KEEPALIVE_DEFAULT) in ceph_print_client_options()
613 jiffies_to_msecs(opt->osd_keepalive_timeout) / 1000); in ceph_print_client_options()
614 if (opt->osd_request_timeout != CEPH_OSD_REQUEST_TIMEOUT_DEFAULT) in ceph_print_client_options()
616 jiffies_to_msecs(opt->osd_request_timeout) / 1000); in ceph_print_client_options()
641 struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private) in ceph_create_client() argument
656 client->options = opt; in ceph_create_client()