Lines Matching full:opt
310 struct ceph_options *opt; in ceph_alloc_options() local
312 opt = kzalloc(sizeof(*opt), GFP_KERNEL); in ceph_alloc_options()
313 if (!opt) in ceph_alloc_options()
316 opt->crush_locs = RB_ROOT; in ceph_alloc_options()
317 opt->mon_addr = kcalloc(CEPH_MAX_MON, sizeof(*opt->mon_addr), in ceph_alloc_options()
319 if (!opt->mon_addr) { in ceph_alloc_options()
320 kfree(opt); in ceph_alloc_options()
324 opt->flags = CEPH_OPT_DEFAULT; in ceph_alloc_options()
325 opt->osd_keepalive_timeout = CEPH_OSD_KEEPALIVE_DEFAULT; in ceph_alloc_options()
326 opt->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT; in ceph_alloc_options()
327 opt->osd_idle_ttl = CEPH_OSD_IDLE_TTL_DEFAULT; in ceph_alloc_options()
328 opt->osd_request_timeout = CEPH_OSD_REQUEST_TIMEOUT_DEFAULT; in ceph_alloc_options()
329 opt->read_from_replica = CEPH_READ_FROM_REPLICA_DEFAULT; in ceph_alloc_options()
330 opt->con_modes[0] = CEPH_CON_MODE_UNKNOWN; in ceph_alloc_options()
331 opt->con_modes[1] = CEPH_CON_MODE_UNKNOWN; in ceph_alloc_options()
332 return opt; in ceph_alloc_options()
336 void ceph_destroy_options(struct ceph_options *opt) in ceph_destroy_options() argument
338 dout("destroy_options %p\n", opt); in ceph_destroy_options()
339 if (!opt) in ceph_destroy_options()
342 ceph_clear_crush_locs(&opt->crush_locs); in ceph_destroy_options()
343 kfree(opt->name); in ceph_destroy_options()
344 if (opt->key) { in ceph_destroy_options()
345 ceph_crypto_key_destroy(opt->key); in ceph_destroy_options()
346 kfree(opt->key); in ceph_destroy_options()
348 kfree(opt->mon_addr); in ceph_destroy_options()
349 kfree(opt); in ceph_destroy_options()
400 int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, in ceph_parse_mon_ips() argument
407 ret = ceph_parse_ips(buf, buf + len, opt->mon_addr, CEPH_MAX_MON, in ceph_parse_mon_ips()
408 &opt->num_mon, delim); in ceph_parse_mon_ips()
418 int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, in ceph_parse_param() argument
434 &opt->my_addr, 1, NULL, ','); in ceph_parse_param()
439 opt->flags |= CEPH_OPT_MYIP; in ceph_parse_param()
443 err = ceph_parse_fsid(param->string, &opt->fsid); in ceph_parse_param()
448 opt->flags |= CEPH_OPT_FSID; in ceph_parse_param()
451 kfree(opt->name); in ceph_parse_param()
452 opt->name = param->string; in ceph_parse_param()
456 ceph_crypto_key_destroy(opt->key); in ceph_parse_param()
457 kfree(opt->key); in ceph_parse_param()
459 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_param()
460 if (!opt->key) in ceph_parse_param()
462 err = ceph_crypto_key_unarmor(opt->key, param->string); in ceph_parse_param()
469 ceph_crypto_key_destroy(opt->key); in ceph_parse_param()
470 kfree(opt->key); in ceph_parse_param()
472 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_param()
473 if (!opt->key) in ceph_parse_param()
475 return get_secret(opt->key, param->string, &log); in ceph_parse_param()
477 ceph_clear_crush_locs(&opt->crush_locs); in ceph_parse_param()
479 &opt->crush_locs); in ceph_parse_param()
489 opt->read_from_replica = 0; in ceph_parse_param()
492 opt->read_from_replica = CEPH_OSD_FLAG_BALANCE_READS; in ceph_parse_param()
495 opt->read_from_replica = CEPH_OSD_FLAG_LOCALIZE_READS; in ceph_parse_param()
504 opt->con_modes[0] = CEPH_CON_MODE_UNKNOWN; in ceph_parse_param()
505 opt->con_modes[1] = CEPH_CON_MODE_UNKNOWN; in ceph_parse_param()
508 opt->con_modes[0] = CEPH_CON_MODE_CRC; in ceph_parse_param()
509 opt->con_modes[1] = CEPH_CON_MODE_UNKNOWN; in ceph_parse_param()
512 opt->con_modes[0] = CEPH_CON_MODE_SECURE; in ceph_parse_param()
513 opt->con_modes[1] = CEPH_CON_MODE_UNKNOWN; in ceph_parse_param()
516 opt->con_modes[0] = CEPH_CON_MODE_CRC; in ceph_parse_param()
517 opt->con_modes[1] = CEPH_CON_MODE_SECURE; in ceph_parse_param()
520 opt->con_modes[0] = CEPH_CON_MODE_SECURE; in ceph_parse_param()
521 opt->con_modes[1] = CEPH_CON_MODE_CRC; in ceph_parse_param()
532 opt->osd_keepalive_timeout = in ceph_parse_param()
539 opt->osd_idle_ttl = msecs_to_jiffies(result.uint_32 * 1000); in ceph_parse_param()
545 opt->mount_timeout = msecs_to_jiffies(result.uint_32 * 1000); in ceph_parse_param()
551 opt->osd_request_timeout = in ceph_parse_param()
557 opt->flags &= ~CEPH_OPT_NOSHARE; in ceph_parse_param()
559 opt->flags |= CEPH_OPT_NOSHARE; in ceph_parse_param()
563 opt->flags &= ~CEPH_OPT_NOCRC; in ceph_parse_param()
565 opt->flags |= CEPH_OPT_NOCRC; in ceph_parse_param()
575 opt->flags &= ~CEPH_OPT_NOMSGSIGN; in ceph_parse_param()
577 opt->flags |= CEPH_OPT_NOMSGSIGN; in ceph_parse_param()
581 opt->flags |= CEPH_OPT_TCP_NODELAY; in ceph_parse_param()
583 opt->flags &= ~CEPH_OPT_TCP_NODELAY; in ceph_parse_param()
587 opt->flags |= CEPH_OPT_ABORT_ON_FULL; in ceph_parse_param()
590 opt->flags |= CEPH_OPT_RXBOUNCE; in ceph_parse_param()
607 struct ceph_options *opt = client->options; in ceph_print_client_options() local
611 if (opt->name) { in ceph_print_client_options()
613 seq_escape(m, opt->name, ", \t\n\\"); in ceph_print_client_options()
616 if (opt->key) in ceph_print_client_options()
619 if (!RB_EMPTY_ROOT(&opt->crush_locs)) { in ceph_print_client_options()
621 for (n = rb_first(&opt->crush_locs); ; ) { in ceph_print_client_options()
635 if (opt->read_from_replica == CEPH_OSD_FLAG_BALANCE_READS) { in ceph_print_client_options()
637 } else if (opt->read_from_replica == CEPH_OSD_FLAG_LOCALIZE_READS) { in ceph_print_client_options()
640 if (opt->con_modes[0] != CEPH_CON_MODE_UNKNOWN) { in ceph_print_client_options()
641 if (opt->con_modes[0] == CEPH_CON_MODE_CRC && in ceph_print_client_options()
642 opt->con_modes[1] == CEPH_CON_MODE_UNKNOWN) { in ceph_print_client_options()
644 } else if (opt->con_modes[0] == CEPH_CON_MODE_SECURE && in ceph_print_client_options()
645 opt->con_modes[1] == CEPH_CON_MODE_UNKNOWN) { in ceph_print_client_options()
647 } else if (opt->con_modes[0] == CEPH_CON_MODE_CRC && in ceph_print_client_options()
648 opt->con_modes[1] == CEPH_CON_MODE_SECURE) { in ceph_print_client_options()
650 } else if (opt->con_modes[0] == CEPH_CON_MODE_SECURE && in ceph_print_client_options()
651 opt->con_modes[1] == CEPH_CON_MODE_CRC) { in ceph_print_client_options()
656 if (opt->flags & CEPH_OPT_FSID) in ceph_print_client_options()
657 seq_printf(m, "fsid=%pU,", &opt->fsid); in ceph_print_client_options()
658 if (opt->flags & CEPH_OPT_NOSHARE) in ceph_print_client_options()
660 if (opt->flags & CEPH_OPT_NOCRC) in ceph_print_client_options()
662 if (opt->flags & CEPH_OPT_NOMSGSIGN) in ceph_print_client_options()
664 if ((opt->flags & CEPH_OPT_TCP_NODELAY) == 0) in ceph_print_client_options()
666 if (show_all && (opt->flags & CEPH_OPT_ABORT_ON_FULL)) in ceph_print_client_options()
668 if (opt->flags & CEPH_OPT_RXBOUNCE) in ceph_print_client_options()
671 if (opt->mount_timeout != CEPH_MOUNT_TIMEOUT_DEFAULT) in ceph_print_client_options()
673 jiffies_to_msecs(opt->mount_timeout) / 1000); in ceph_print_client_options()
674 if (opt->osd_idle_ttl != CEPH_OSD_IDLE_TTL_DEFAULT) in ceph_print_client_options()
676 jiffies_to_msecs(opt->osd_idle_ttl) / 1000); in ceph_print_client_options()
677 if (opt->osd_keepalive_timeout != CEPH_OSD_KEEPALIVE_DEFAULT) in ceph_print_client_options()
679 jiffies_to_msecs(opt->osd_keepalive_timeout) / 1000); in ceph_print_client_options()
680 if (opt->osd_request_timeout != CEPH_OSD_REQUEST_TIMEOUT_DEFAULT) in ceph_print_client_options()
682 jiffies_to_msecs(opt->osd_request_timeout) / 1000); in ceph_print_client_options()
707 struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private) in ceph_create_client() argument
722 client->options = opt; in ceph_create_client()