Lines Matching refs:fsopt

251 static int namespace_equals(struct ceph_mount_options *fsopt,  in namespace_equals()  argument
254 return !(fsopt->mds_namespace && in namespace_equals()
255 (strlen(fsopt->mds_namespace) != len || in namespace_equals()
256 strncmp(fsopt->mds_namespace, namespace, len))); in namespace_equals()
264 struct ceph_mount_options *fsopt = pctx->opts; in ceph_parse_old_source() local
274 fsopt->new_dev_syntax = false; in ceph_parse_old_source()
284 struct ceph_mount_options *fsopt = pctx->opts; in ceph_parse_new_source() local
307 if (!namespace_equals(fsopt, fs_name_start, len)) in ceph_parse_new_source()
309 kfree(fsopt->mds_namespace); in ceph_parse_new_source()
310 fsopt->mds_namespace = kstrndup(fs_name_start, len, GFP_KERNEL); in ceph_parse_new_source()
311 if (!fsopt->mds_namespace) in ceph_parse_new_source()
313 dout("file system (mds namespace) '%s'\n", fsopt->mds_namespace); in ceph_parse_new_source()
315 fsopt->new_dev_syntax = true; in ceph_parse_new_source()
340 struct ceph_mount_options *fsopt = pctx->opts; in ceph_parse_source() local
354 kfree(fsopt->server_path); in ceph_parse_source()
355 fsopt->server_path = kstrdup(dev_name_end, GFP_KERNEL); in ceph_parse_source()
356 if (!fsopt->server_path) in ceph_parse_source()
359 canonicalize_path(fsopt->server_path); in ceph_parse_source()
369 if (fsopt->server_path) in ceph_parse_source()
370 dout("server path '%s'\n", fsopt->server_path); in ceph_parse_source()
392 struct ceph_mount_options *fsopt = pctx->opts; in ceph_parse_mon_addr() local
394 kfree(fsopt->mon_addr); in ceph_parse_mon_addr()
395 fsopt->mon_addr = param->string; in ceph_parse_mon_addr()
398 return ceph_parse_mon_ips(fsopt->mon_addr, strlen(fsopt->mon_addr), in ceph_parse_mon_addr()
406 struct ceph_mount_options *fsopt = pctx->opts; in ceph_parse_mount_param() local
422 kfree(fsopt->snapdir_name); in ceph_parse_mount_param()
423 fsopt->snapdir_name = param->string; in ceph_parse_mount_param()
427 if (!namespace_equals(fsopt, param->string, strlen(param->string))) in ceph_parse_mount_param()
429 kfree(fsopt->mds_namespace); in ceph_parse_mount_param()
430 fsopt->mds_namespace = param->string; in ceph_parse_mount_param()
436 fsopt->flags &= ~CEPH_MOUNT_OPT_CLEANRECOVER; in ceph_parse_mount_param()
438 fsopt->flags |= CEPH_MOUNT_OPT_CLEANRECOVER; in ceph_parse_mount_param()
452 fsopt->wsize = ALIGN(result.uint_32, PAGE_SIZE); in ceph_parse_mount_param()
458 fsopt->rsize = ALIGN(result.uint_32, PAGE_SIZE); in ceph_parse_mount_param()
461 fsopt->rasize = ALIGN(result.uint_32, PAGE_SIZE); in ceph_parse_mount_param()
466 fsopt->caps_wanted_delay_min = result.uint_32; in ceph_parse_mount_param()
471 fsopt->caps_wanted_delay_max = result.uint_32; in ceph_parse_mount_param()
476 fsopt->caps_max = result.int_32; in ceph_parse_mount_param()
481 fsopt->max_readdir = result.uint_32; in ceph_parse_mount_param()
486 fsopt->max_readdir_bytes = result.uint_32; in ceph_parse_mount_param()
491 fsopt->congestion_kb = result.uint_32; in ceph_parse_mount_param()
495 fsopt->flags |= CEPH_MOUNT_OPT_DIRSTAT; in ceph_parse_mount_param()
497 fsopt->flags &= ~CEPH_MOUNT_OPT_DIRSTAT; in ceph_parse_mount_param()
501 fsopt->flags |= CEPH_MOUNT_OPT_RBYTES; in ceph_parse_mount_param()
503 fsopt->flags &= ~CEPH_MOUNT_OPT_RBYTES; in ceph_parse_mount_param()
507 fsopt->flags &= ~CEPH_MOUNT_OPT_NOASYNCREADDIR; in ceph_parse_mount_param()
509 fsopt->flags |= CEPH_MOUNT_OPT_NOASYNCREADDIR; in ceph_parse_mount_param()
513 fsopt->flags |= CEPH_MOUNT_OPT_DCACHE; in ceph_parse_mount_param()
515 fsopt->flags &= ~CEPH_MOUNT_OPT_DCACHE; in ceph_parse_mount_param()
519 fsopt->flags |= CEPH_MOUNT_OPT_INO32; in ceph_parse_mount_param()
521 fsopt->flags &= ~CEPH_MOUNT_OPT_INO32; in ceph_parse_mount_param()
526 kfree(fsopt->fscache_uniq); in ceph_parse_mount_param()
527 fsopt->fscache_uniq = NULL; in ceph_parse_mount_param()
529 fsopt->flags &= ~CEPH_MOUNT_OPT_FSCACHE; in ceph_parse_mount_param()
531 fsopt->flags |= CEPH_MOUNT_OPT_FSCACHE; in ceph_parse_mount_param()
532 fsopt->fscache_uniq = param->string; in ceph_parse_mount_param()
541 fsopt->flags &= ~CEPH_MOUNT_OPT_NOPOOLPERM; in ceph_parse_mount_param()
543 fsopt->flags |= CEPH_MOUNT_OPT_NOPOOLPERM; in ceph_parse_mount_param()
547 fsopt->flags &= ~CEPH_MOUNT_OPT_MOUNTWAIT; in ceph_parse_mount_param()
549 fsopt->flags |= CEPH_MOUNT_OPT_MOUNTWAIT; in ceph_parse_mount_param()
553 fsopt->flags &= ~CEPH_MOUNT_OPT_NOQUOTADF; in ceph_parse_mount_param()
555 fsopt->flags |= CEPH_MOUNT_OPT_NOQUOTADF; in ceph_parse_mount_param()
559 fsopt->flags &= ~CEPH_MOUNT_OPT_NOCOPYFROM; in ceph_parse_mount_param()
561 fsopt->flags |= CEPH_MOUNT_OPT_NOCOPYFROM; in ceph_parse_mount_param()
576 fsopt->flags &= ~CEPH_MOUNT_OPT_ASYNC_DIROPS; in ceph_parse_mount_param()
578 fsopt->flags |= CEPH_MOUNT_OPT_ASYNC_DIROPS; in ceph_parse_mount_param()
582 fsopt->flags |= CEPH_MOUNT_OPT_NOPAGECACHE; in ceph_parse_mount_param()
584 fsopt->flags &= ~CEPH_MOUNT_OPT_NOPAGECACHE; in ceph_parse_mount_param()
588 fsopt->flags &= ~CEPH_MOUNT_OPT_SPARSEREAD; in ceph_parse_mount_param()
590 fsopt->flags |= CEPH_MOUNT_OPT_SPARSEREAD; in ceph_parse_mount_param()
594 fscrypt_free_dummy_policy(&fsopt->dummy_enc_policy); in ceph_parse_mount_param()
596 &fsopt->dummy_enc_policy); in ceph_parse_mount_param()
688 struct ceph_mount_options *fsopt = fsc->mount_options; in ceph_show_options() local
704 if (fsopt->flags & CEPH_MOUNT_OPT_DIRSTAT) in ceph_show_options()
706 if ((fsopt->flags & CEPH_MOUNT_OPT_RBYTES)) in ceph_show_options()
708 if (fsopt->flags & CEPH_MOUNT_OPT_NOASYNCREADDIR) in ceph_show_options()
710 if ((fsopt->flags & CEPH_MOUNT_OPT_DCACHE) == 0) in ceph_show_options()
712 if (fsopt->flags & CEPH_MOUNT_OPT_INO32) in ceph_show_options()
714 if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) { in ceph_show_options()
715 seq_show_option(m, "fsc", fsopt->fscache_uniq); in ceph_show_options()
717 if (fsopt->flags & CEPH_MOUNT_OPT_NOPOOLPERM) in ceph_show_options()
719 if (fsopt->flags & CEPH_MOUNT_OPT_NOQUOTADF) in ceph_show_options()
729 if ((fsopt->flags & CEPH_MOUNT_OPT_NOCOPYFROM) == 0) in ceph_show_options()
733 if (fsopt->mds_namespace && !fsopt->new_dev_syntax) in ceph_show_options()
734 seq_show_option(m, "mds_namespace", fsopt->mds_namespace); in ceph_show_options()
736 if (fsopt->mon_addr) in ceph_show_options()
737 seq_printf(m, ",mon_addr=%s", fsopt->mon_addr); in ceph_show_options()
739 if (fsopt->flags & CEPH_MOUNT_OPT_CLEANRECOVER) in ceph_show_options()
742 if (!(fsopt->flags & CEPH_MOUNT_OPT_ASYNC_DIROPS)) in ceph_show_options()
744 if (fsopt->flags & CEPH_MOUNT_OPT_NOPAGECACHE) in ceph_show_options()
746 if (fsopt->flags & CEPH_MOUNT_OPT_SPARSEREAD) in ceph_show_options()
751 if (fsopt->wsize != CEPH_MAX_WRITE_SIZE) in ceph_show_options()
752 seq_printf(m, ",wsize=%u", fsopt->wsize); in ceph_show_options()
753 if (fsopt->rsize != CEPH_MAX_READ_SIZE) in ceph_show_options()
754 seq_printf(m, ",rsize=%u", fsopt->rsize); in ceph_show_options()
755 if (fsopt->rasize != CEPH_RASIZE_DEFAULT) in ceph_show_options()
756 seq_printf(m, ",rasize=%u", fsopt->rasize); in ceph_show_options()
757 if (fsopt->congestion_kb != default_congestion_kb()) in ceph_show_options()
758 seq_printf(m, ",write_congestion_kb=%u", fsopt->congestion_kb); in ceph_show_options()
759 if (fsopt->caps_max) in ceph_show_options()
760 seq_printf(m, ",caps_max=%d", fsopt->caps_max); in ceph_show_options()
761 if (fsopt->caps_wanted_delay_min != CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT) in ceph_show_options()
763 fsopt->caps_wanted_delay_min); in ceph_show_options()
764 if (fsopt->caps_wanted_delay_max != CEPH_CAPS_WANTED_DELAY_MAX_DEFAULT) in ceph_show_options()
766 fsopt->caps_wanted_delay_max); in ceph_show_options()
767 if (fsopt->max_readdir != CEPH_MAX_READDIR_DEFAULT) in ceph_show_options()
768 seq_printf(m, ",readdir_max_entries=%u", fsopt->max_readdir); in ceph_show_options()
769 if (fsopt->max_readdir_bytes != CEPH_MAX_READDIR_BYTES_DEFAULT) in ceph_show_options()
770 seq_printf(m, ",readdir_max_bytes=%u", fsopt->max_readdir_bytes); in ceph_show_options()
771 if (strcmp(fsopt->snapdir_name, CEPH_SNAPDIRNAME_DEFAULT)) in ceph_show_options()
772 seq_show_option(m, "snapdirname", fsopt->snapdir_name); in ceph_show_options()
803 static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt, in create_fs_client() argument
825 if (!fsopt->mds_namespace) { in create_fs_client()
833 fsc->mount_options = fsopt; in create_fs_client()
872 destroy_mount_options(fsopt); in create_fs_client()
1092 struct ceph_mount_options *fsopt) in ceph_apply_test_dummy_encryption() argument
1096 if (!fscrypt_is_dummy_policy_set(&fsopt->dummy_enc_policy)) in ceph_apply_test_dummy_encryption()
1102 if (fscrypt_dummy_policies_equal(&fsopt->dummy_enc_policy, in ceph_apply_test_dummy_encryption()
1111 if (fscrypt_dummy_policies_equal(&fsopt->dummy_enc_policy, in ceph_apply_test_dummy_encryption()
1118 fsc->fsc_dummy_enc_policy = fsopt->dummy_enc_policy; in ceph_apply_test_dummy_encryption()
1119 memset(&fsopt->dummy_enc_policy, 0, sizeof(fsopt->dummy_enc_policy)); in ceph_apply_test_dummy_encryption()
1127 struct ceph_mount_options *fsopt) in ceph_apply_test_dummy_encryption() argument
1227 struct ceph_mount_options *fsopt = new->mount_options; in ceph_compare_super() local
1233 if (compare_mount_options(fsopt, opt, fsc)) { in ceph_compare_super()
1286 struct ceph_mount_options *fsopt = pctx->opts; in ceph_get_tree() local
1298 if (fsopt->new_dev_syntax && !fsopt->mon_addr) in ceph_get_tree()
1378 struct ceph_mount_options *fsopt = pctx->opts; in ceph_reconfigure_fc() local
1382 err = ceph_apply_test_dummy_encryption(sb, fc, fsopt); in ceph_reconfigure_fc()
1386 if (fsopt->flags & CEPH_MOUNT_OPT_ASYNC_DIROPS) in ceph_reconfigure_fc()
1391 if (fsopt->flags & CEPH_MOUNT_OPT_SPARSEREAD) in ceph_reconfigure_fc()
1396 if (strcmp_null(fsc->mount_options->mon_addr, fsopt->mon_addr)) { in ceph_reconfigure_fc()
1398 fsc->mount_options->mon_addr = fsopt->mon_addr; in ceph_reconfigure_fc()
1399 fsopt->mon_addr = NULL; in ceph_reconfigure_fc()
1420 struct ceph_mount_options *fsopt; in ceph_init_fs_context() local
1434 fsopt = pctx->opts; in ceph_init_fs_context()
1435 fsopt->flags = CEPH_MOUNT_OPT_DEFAULT; in ceph_init_fs_context()
1437 fsopt->wsize = CEPH_MAX_WRITE_SIZE; in ceph_init_fs_context()
1438 fsopt->rsize = CEPH_MAX_READ_SIZE; in ceph_init_fs_context()
1439 fsopt->rasize = CEPH_RASIZE_DEFAULT; in ceph_init_fs_context()
1440 fsopt->snapdir_name = kstrdup(CEPH_SNAPDIRNAME_DEFAULT, GFP_KERNEL); in ceph_init_fs_context()
1441 if (!fsopt->snapdir_name) in ceph_init_fs_context()
1444 fsopt->caps_wanted_delay_min = CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT; in ceph_init_fs_context()
1445 fsopt->caps_wanted_delay_max = CEPH_CAPS_WANTED_DELAY_MAX_DEFAULT; in ceph_init_fs_context()
1446 fsopt->max_readdir = CEPH_MAX_READDIR_DEFAULT; in ceph_init_fs_context()
1447 fsopt->max_readdir_bytes = CEPH_MAX_READDIR_BYTES_DEFAULT; in ceph_init_fs_context()
1448 fsopt->congestion_kb = default_congestion_kb(); in ceph_init_fs_context()