Lines Matching refs:opt
279 void ceph_destroy_options(struct ceph_options *opt) in ceph_destroy_options() argument
281 dout("destroy_options %p\n", opt); in ceph_destroy_options()
282 kfree(opt->name); in ceph_destroy_options()
283 if (opt->key) { in ceph_destroy_options()
284 ceph_crypto_key_destroy(opt->key); in ceph_destroy_options()
285 kfree(opt->key); in ceph_destroy_options()
287 kfree(opt->mon_addr); in ceph_destroy_options()
288 kfree(opt); in ceph_destroy_options()
343 struct ceph_options *opt; in ceph_parse_options() local
348 opt = kzalloc(sizeof(*opt), GFP_KERNEL); in ceph_parse_options()
349 if (!opt) in ceph_parse_options()
351 opt->mon_addr = kcalloc(CEPH_MAX_MON, sizeof(*opt->mon_addr), in ceph_parse_options()
353 if (!opt->mon_addr) in ceph_parse_options()
356 dout("parse_options %p options '%s' dev_name '%s'\n", opt, options, in ceph_parse_options()
360 opt->flags = CEPH_OPT_DEFAULT; in ceph_parse_options()
361 opt->osd_keepalive_timeout = CEPH_OSD_KEEPALIVE_DEFAULT; in ceph_parse_options()
362 opt->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT; in ceph_parse_options()
363 opt->osd_idle_ttl = CEPH_OSD_IDLE_TTL_DEFAULT; in ceph_parse_options()
364 opt->monc_ping_timeout = CEPH_MONC_PING_TIMEOUT_DEFAULT; in ceph_parse_options()
368 err = ceph_parse_ips(dev_name, dev_name_end, opt->mon_addr, in ceph_parse_options()
369 CEPH_MAX_MON, &opt->num_mon); in ceph_parse_options()
407 &opt->my_addr, in ceph_parse_options()
411 opt->flags |= CEPH_OPT_MYIP; in ceph_parse_options()
415 err = parse_fsid(argstr[0].from, &opt->fsid); in ceph_parse_options()
417 opt->flags |= CEPH_OPT_FSID; in ceph_parse_options()
420 opt->name = kstrndup(argstr[0].from, in ceph_parse_options()
425 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_options()
426 if (!opt->key) { in ceph_parse_options()
430 err = ceph_crypto_key_unarmor(opt->key, argstr[0].from); in ceph_parse_options()
435 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_options()
436 if (!opt->key) { in ceph_parse_options()
440 err = get_secret(opt->key, argstr[0].from); in ceph_parse_options()
456 opt->osd_keepalive_timeout = in ceph_parse_options()
466 opt->osd_idle_ttl = msecs_to_jiffies(intval * 1000); in ceph_parse_options()
475 opt->mount_timeout = msecs_to_jiffies(intval * 1000); in ceph_parse_options()
479 opt->flags &= ~CEPH_OPT_NOSHARE; in ceph_parse_options()
482 opt->flags |= CEPH_OPT_NOSHARE; in ceph_parse_options()
486 opt->flags &= ~CEPH_OPT_NOCRC; in ceph_parse_options()
489 opt->flags |= CEPH_OPT_NOCRC; in ceph_parse_options()
493 opt->flags &= ~CEPH_OPT_NOMSGAUTH; in ceph_parse_options()
496 opt->flags |= CEPH_OPT_NOMSGAUTH; in ceph_parse_options()
499 opt->flags &= ~CEPH_OPT_NOMSGSIGN; in ceph_parse_options()
502 opt->flags |= CEPH_OPT_NOMSGSIGN; in ceph_parse_options()
506 opt->flags |= CEPH_OPT_TCP_NODELAY; in ceph_parse_options()
509 opt->flags &= ~CEPH_OPT_TCP_NODELAY; in ceph_parse_options()
518 return opt; in ceph_parse_options()
521 ceph_destroy_options(opt); in ceph_parse_options()
528 struct ceph_options *opt = client->options; in ceph_print_client_options() local
531 if (opt->name) { in ceph_print_client_options()
533 seq_escape(m, opt->name, ", \t\n\\"); in ceph_print_client_options()
536 if (opt->key) in ceph_print_client_options()
539 if (opt->flags & CEPH_OPT_FSID) in ceph_print_client_options()
540 seq_printf(m, "fsid=%pU,", &opt->fsid); in ceph_print_client_options()
541 if (opt->flags & CEPH_OPT_NOSHARE) in ceph_print_client_options()
543 if (opt->flags & CEPH_OPT_NOCRC) in ceph_print_client_options()
545 if (opt->flags & CEPH_OPT_NOMSGAUTH) in ceph_print_client_options()
547 if (opt->flags & CEPH_OPT_NOMSGSIGN) in ceph_print_client_options()
549 if ((opt->flags & CEPH_OPT_TCP_NODELAY) == 0) in ceph_print_client_options()
552 if (opt->mount_timeout != CEPH_MOUNT_TIMEOUT_DEFAULT) in ceph_print_client_options()
554 jiffies_to_msecs(opt->mount_timeout) / 1000); in ceph_print_client_options()
555 if (opt->osd_idle_ttl != CEPH_OSD_IDLE_TTL_DEFAULT) in ceph_print_client_options()
557 jiffies_to_msecs(opt->osd_idle_ttl) / 1000); in ceph_print_client_options()
558 if (opt->osd_keepalive_timeout != CEPH_OSD_KEEPALIVE_DEFAULT) in ceph_print_client_options()
560 jiffies_to_msecs(opt->osd_keepalive_timeout) / 1000); in ceph_print_client_options()
579 struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private, in ceph_create_client() argument
592 client->options = opt; in ceph_create_client()