Lines Matching refs:opt
286 void ceph_destroy_options(struct ceph_options *opt) in ceph_destroy_options() argument
288 dout("destroy_options %p\n", opt); in ceph_destroy_options()
289 kfree(opt->name); in ceph_destroy_options()
290 if (opt->key) { in ceph_destroy_options()
291 ceph_crypto_key_destroy(opt->key); in ceph_destroy_options()
292 kfree(opt->key); in ceph_destroy_options()
294 kfree(opt->mon_addr); in ceph_destroy_options()
295 kfree(opt); in ceph_destroy_options()
350 struct ceph_options *opt; in ceph_parse_options() local
355 opt = kzalloc(sizeof(*opt), GFP_KERNEL); in ceph_parse_options()
356 if (!opt) in ceph_parse_options()
358 opt->mon_addr = kcalloc(CEPH_MAX_MON, sizeof(*opt->mon_addr), in ceph_parse_options()
360 if (!opt->mon_addr) in ceph_parse_options()
363 dout("parse_options %p options '%s' dev_name '%s'\n", opt, options, in ceph_parse_options()
367 opt->flags = CEPH_OPT_DEFAULT; in ceph_parse_options()
368 opt->osd_keepalive_timeout = CEPH_OSD_KEEPALIVE_DEFAULT; in ceph_parse_options()
369 opt->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT; in ceph_parse_options()
370 opt->osd_idle_ttl = CEPH_OSD_IDLE_TTL_DEFAULT; in ceph_parse_options()
371 opt->osd_request_timeout = CEPH_OSD_REQUEST_TIMEOUT_DEFAULT; in ceph_parse_options()
375 err = ceph_parse_ips(dev_name, dev_name_end, opt->mon_addr, in ceph_parse_options()
376 CEPH_MAX_MON, &opt->num_mon); in ceph_parse_options()
413 &opt->my_addr, in ceph_parse_options()
417 opt->flags |= CEPH_OPT_MYIP; in ceph_parse_options()
421 err = parse_fsid(argstr[0].from, &opt->fsid); in ceph_parse_options()
423 opt->flags |= CEPH_OPT_FSID; in ceph_parse_options()
426 kfree(opt->name); in ceph_parse_options()
427 opt->name = kstrndup(argstr[0].from, in ceph_parse_options()
430 if (!opt->name) { in ceph_parse_options()
436 ceph_crypto_key_destroy(opt->key); in ceph_parse_options()
437 kfree(opt->key); in ceph_parse_options()
439 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_options()
440 if (!opt->key) { in ceph_parse_options()
444 err = ceph_crypto_key_unarmor(opt->key, argstr[0].from); in ceph_parse_options()
449 ceph_crypto_key_destroy(opt->key); in ceph_parse_options()
450 kfree(opt->key); in ceph_parse_options()
452 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_options()
453 if (!opt->key) { in ceph_parse_options()
457 err = get_secret(opt->key, argstr[0].from); in ceph_parse_options()
473 opt->osd_keepalive_timeout = in ceph_parse_options()
483 opt->osd_idle_ttl = msecs_to_jiffies(intval * 1000); in ceph_parse_options()
492 opt->mount_timeout = msecs_to_jiffies(intval * 1000); in ceph_parse_options()
501 opt->osd_request_timeout = msecs_to_jiffies(intval * 1000); in ceph_parse_options()
505 opt->flags &= ~CEPH_OPT_NOSHARE; in ceph_parse_options()
508 opt->flags |= CEPH_OPT_NOSHARE; in ceph_parse_options()
512 opt->flags &= ~CEPH_OPT_NOCRC; in ceph_parse_options()
515 opt->flags |= CEPH_OPT_NOCRC; in ceph_parse_options()
519 opt->flags &= ~CEPH_OPT_NOMSGAUTH; in ceph_parse_options()
522 opt->flags |= CEPH_OPT_NOMSGAUTH; in ceph_parse_options()
525 opt->flags &= ~CEPH_OPT_NOMSGSIGN; in ceph_parse_options()
528 opt->flags |= CEPH_OPT_NOMSGSIGN; in ceph_parse_options()
532 opt->flags |= CEPH_OPT_TCP_NODELAY; in ceph_parse_options()
535 opt->flags &= ~CEPH_OPT_TCP_NODELAY; in ceph_parse_options()
544 return opt; in ceph_parse_options()
547 ceph_destroy_options(opt); in ceph_parse_options()
554 struct ceph_options *opt = client->options; in ceph_print_client_options() local
557 if (opt->name) { in ceph_print_client_options()
559 seq_escape(m, opt->name, ", \t\n\\"); in ceph_print_client_options()
562 if (opt->key) in ceph_print_client_options()
565 if (opt->flags & CEPH_OPT_FSID) in ceph_print_client_options()
566 seq_printf(m, "fsid=%pU,", &opt->fsid); in ceph_print_client_options()
567 if (opt->flags & CEPH_OPT_NOSHARE) in ceph_print_client_options()
569 if (opt->flags & CEPH_OPT_NOCRC) in ceph_print_client_options()
571 if (opt->flags & CEPH_OPT_NOMSGAUTH) in ceph_print_client_options()
573 if (opt->flags & CEPH_OPT_NOMSGSIGN) in ceph_print_client_options()
575 if ((opt->flags & CEPH_OPT_TCP_NODELAY) == 0) in ceph_print_client_options()
578 if (opt->mount_timeout != CEPH_MOUNT_TIMEOUT_DEFAULT) in ceph_print_client_options()
580 jiffies_to_msecs(opt->mount_timeout) / 1000); in ceph_print_client_options()
581 if (opt->osd_idle_ttl != CEPH_OSD_IDLE_TTL_DEFAULT) in ceph_print_client_options()
583 jiffies_to_msecs(opt->osd_idle_ttl) / 1000); in ceph_print_client_options()
584 if (opt->osd_keepalive_timeout != CEPH_OSD_KEEPALIVE_DEFAULT) in ceph_print_client_options()
586 jiffies_to_msecs(opt->osd_keepalive_timeout) / 1000); in ceph_print_client_options()
587 if (opt->osd_request_timeout != CEPH_OSD_REQUEST_TIMEOUT_DEFAULT) in ceph_print_client_options()
589 jiffies_to_msecs(opt->osd_request_timeout) / 1000); in ceph_print_client_options()
614 struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private) in ceph_create_client() argument
629 client->options = opt; in ceph_create_client()