Lines Matching refs:fsopt

244 static int namespace_equals(struct ceph_mount_options *fsopt,  in namespace_equals()  argument
247 return !(fsopt->mds_namespace && in namespace_equals()
248 (strlen(fsopt->mds_namespace) != len || in namespace_equals()
249 strncmp(fsopt->mds_namespace, namespace, len))); in namespace_equals()
257 struct ceph_mount_options *fsopt = pctx->opts; in ceph_parse_old_source() local
267 fsopt->new_dev_syntax = false; in ceph_parse_old_source()
277 struct ceph_mount_options *fsopt = pctx->opts; in ceph_parse_new_source() local
300 if (!namespace_equals(fsopt, fs_name_start, len)) in ceph_parse_new_source()
302 kfree(fsopt->mds_namespace); in ceph_parse_new_source()
303 fsopt->mds_namespace = kstrndup(fs_name_start, len, GFP_KERNEL); in ceph_parse_new_source()
304 if (!fsopt->mds_namespace) in ceph_parse_new_source()
306 dout("file system (mds namespace) '%s'\n", fsopt->mds_namespace); in ceph_parse_new_source()
308 fsopt->new_dev_syntax = true; in ceph_parse_new_source()
333 struct ceph_mount_options *fsopt = pctx->opts; in ceph_parse_source() local
347 kfree(fsopt->server_path); in ceph_parse_source()
348 fsopt->server_path = kstrdup(dev_name_end, GFP_KERNEL); in ceph_parse_source()
349 if (!fsopt->server_path) in ceph_parse_source()
352 canonicalize_path(fsopt->server_path); in ceph_parse_source()
362 if (fsopt->server_path) in ceph_parse_source()
363 dout("server path '%s'\n", fsopt->server_path); in ceph_parse_source()
385 struct ceph_mount_options *fsopt = pctx->opts; in ceph_parse_mon_addr() local
387 kfree(fsopt->mon_addr); in ceph_parse_mon_addr()
388 fsopt->mon_addr = param->string; in ceph_parse_mon_addr()
391 return ceph_parse_mon_ips(fsopt->mon_addr, strlen(fsopt->mon_addr), in ceph_parse_mon_addr()
399 struct ceph_mount_options *fsopt = pctx->opts; in ceph_parse_mount_param() local
415 kfree(fsopt->snapdir_name); in ceph_parse_mount_param()
416 fsopt->snapdir_name = param->string; in ceph_parse_mount_param()
420 if (!namespace_equals(fsopt, param->string, strlen(param->string))) in ceph_parse_mount_param()
422 kfree(fsopt->mds_namespace); in ceph_parse_mount_param()
423 fsopt->mds_namespace = param->string; in ceph_parse_mount_param()
429 fsopt->flags &= ~CEPH_MOUNT_OPT_CLEANRECOVER; in ceph_parse_mount_param()
431 fsopt->flags |= CEPH_MOUNT_OPT_CLEANRECOVER; in ceph_parse_mount_param()
445 fsopt->wsize = ALIGN(result.uint_32, PAGE_SIZE); in ceph_parse_mount_param()
451 fsopt->rsize = ALIGN(result.uint_32, PAGE_SIZE); in ceph_parse_mount_param()
454 fsopt->rasize = ALIGN(result.uint_32, PAGE_SIZE); in ceph_parse_mount_param()
459 fsopt->caps_wanted_delay_min = result.uint_32; in ceph_parse_mount_param()
464 fsopt->caps_wanted_delay_max = result.uint_32; in ceph_parse_mount_param()
469 fsopt->caps_max = result.int_32; in ceph_parse_mount_param()
474 fsopt->max_readdir = result.uint_32; in ceph_parse_mount_param()
479 fsopt->max_readdir_bytes = result.uint_32; in ceph_parse_mount_param()
484 fsopt->congestion_kb = result.uint_32; in ceph_parse_mount_param()
488 fsopt->flags |= CEPH_MOUNT_OPT_DIRSTAT; in ceph_parse_mount_param()
490 fsopt->flags &= ~CEPH_MOUNT_OPT_DIRSTAT; in ceph_parse_mount_param()
494 fsopt->flags |= CEPH_MOUNT_OPT_RBYTES; in ceph_parse_mount_param()
496 fsopt->flags &= ~CEPH_MOUNT_OPT_RBYTES; in ceph_parse_mount_param()
500 fsopt->flags &= ~CEPH_MOUNT_OPT_NOASYNCREADDIR; in ceph_parse_mount_param()
502 fsopt->flags |= CEPH_MOUNT_OPT_NOASYNCREADDIR; in ceph_parse_mount_param()
506 fsopt->flags |= CEPH_MOUNT_OPT_DCACHE; in ceph_parse_mount_param()
508 fsopt->flags &= ~CEPH_MOUNT_OPT_DCACHE; in ceph_parse_mount_param()
512 fsopt->flags |= CEPH_MOUNT_OPT_INO32; in ceph_parse_mount_param()
514 fsopt->flags &= ~CEPH_MOUNT_OPT_INO32; in ceph_parse_mount_param()
519 kfree(fsopt->fscache_uniq); in ceph_parse_mount_param()
520 fsopt->fscache_uniq = NULL; in ceph_parse_mount_param()
522 fsopt->flags &= ~CEPH_MOUNT_OPT_FSCACHE; in ceph_parse_mount_param()
524 fsopt->flags |= CEPH_MOUNT_OPT_FSCACHE; in ceph_parse_mount_param()
525 fsopt->fscache_uniq = param->string; in ceph_parse_mount_param()
534 fsopt->flags &= ~CEPH_MOUNT_OPT_NOPOOLPERM; in ceph_parse_mount_param()
536 fsopt->flags |= CEPH_MOUNT_OPT_NOPOOLPERM; in ceph_parse_mount_param()
540 fsopt->flags &= ~CEPH_MOUNT_OPT_MOUNTWAIT; in ceph_parse_mount_param()
542 fsopt->flags |= CEPH_MOUNT_OPT_MOUNTWAIT; in ceph_parse_mount_param()
546 fsopt->flags &= ~CEPH_MOUNT_OPT_NOQUOTADF; in ceph_parse_mount_param()
548 fsopt->flags |= CEPH_MOUNT_OPT_NOQUOTADF; in ceph_parse_mount_param()
552 fsopt->flags &= ~CEPH_MOUNT_OPT_NOCOPYFROM; in ceph_parse_mount_param()
554 fsopt->flags |= CEPH_MOUNT_OPT_NOCOPYFROM; in ceph_parse_mount_param()
569 fsopt->flags &= ~CEPH_MOUNT_OPT_ASYNC_DIROPS; in ceph_parse_mount_param()
571 fsopt->flags |= CEPH_MOUNT_OPT_ASYNC_DIROPS; in ceph_parse_mount_param()
575 fsopt->flags |= CEPH_MOUNT_OPT_NOPAGECACHE; in ceph_parse_mount_param()
577 fsopt->flags &= ~CEPH_MOUNT_OPT_NOPAGECACHE; in ceph_parse_mount_param()
657 struct ceph_mount_options *fsopt = fsc->mount_options; in ceph_show_options() local
673 if (fsopt->flags & CEPH_MOUNT_OPT_DIRSTAT) in ceph_show_options()
675 if ((fsopt->flags & CEPH_MOUNT_OPT_RBYTES)) in ceph_show_options()
677 if (fsopt->flags & CEPH_MOUNT_OPT_NOASYNCREADDIR) in ceph_show_options()
679 if ((fsopt->flags & CEPH_MOUNT_OPT_DCACHE) == 0) in ceph_show_options()
681 if (fsopt->flags & CEPH_MOUNT_OPT_INO32) in ceph_show_options()
683 if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) { in ceph_show_options()
684 seq_show_option(m, "fsc", fsopt->fscache_uniq); in ceph_show_options()
686 if (fsopt->flags & CEPH_MOUNT_OPT_NOPOOLPERM) in ceph_show_options()
688 if (fsopt->flags & CEPH_MOUNT_OPT_NOQUOTADF) in ceph_show_options()
698 if ((fsopt->flags & CEPH_MOUNT_OPT_NOCOPYFROM) == 0) in ceph_show_options()
702 if (fsopt->mds_namespace && !fsopt->new_dev_syntax) in ceph_show_options()
703 seq_show_option(m, "mds_namespace", fsopt->mds_namespace); in ceph_show_options()
705 if (fsopt->mon_addr) in ceph_show_options()
706 seq_printf(m, ",mon_addr=%s", fsopt->mon_addr); in ceph_show_options()
708 if (fsopt->flags & CEPH_MOUNT_OPT_CLEANRECOVER) in ceph_show_options()
711 if (!(fsopt->flags & CEPH_MOUNT_OPT_ASYNC_DIROPS)) in ceph_show_options()
714 if (fsopt->flags & CEPH_MOUNT_OPT_NOPAGECACHE) in ceph_show_options()
717 if (fsopt->wsize != CEPH_MAX_WRITE_SIZE) in ceph_show_options()
718 seq_printf(m, ",wsize=%u", fsopt->wsize); in ceph_show_options()
719 if (fsopt->rsize != CEPH_MAX_READ_SIZE) in ceph_show_options()
720 seq_printf(m, ",rsize=%u", fsopt->rsize); in ceph_show_options()
721 if (fsopt->rasize != CEPH_RASIZE_DEFAULT) in ceph_show_options()
722 seq_printf(m, ",rasize=%u", fsopt->rasize); in ceph_show_options()
723 if (fsopt->congestion_kb != default_congestion_kb()) in ceph_show_options()
724 seq_printf(m, ",write_congestion_kb=%u", fsopt->congestion_kb); in ceph_show_options()
725 if (fsopt->caps_max) in ceph_show_options()
726 seq_printf(m, ",caps_max=%d", fsopt->caps_max); in ceph_show_options()
727 if (fsopt->caps_wanted_delay_min != CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT) in ceph_show_options()
729 fsopt->caps_wanted_delay_min); in ceph_show_options()
730 if (fsopt->caps_wanted_delay_max != CEPH_CAPS_WANTED_DELAY_MAX_DEFAULT) in ceph_show_options()
732 fsopt->caps_wanted_delay_max); in ceph_show_options()
733 if (fsopt->max_readdir != CEPH_MAX_READDIR_DEFAULT) in ceph_show_options()
734 seq_printf(m, ",readdir_max_entries=%u", fsopt->max_readdir); in ceph_show_options()
735 if (fsopt->max_readdir_bytes != CEPH_MAX_READDIR_BYTES_DEFAULT) in ceph_show_options()
736 seq_printf(m, ",readdir_max_bytes=%u", fsopt->max_readdir_bytes); in ceph_show_options()
737 if (strcmp(fsopt->snapdir_name, CEPH_SNAPDIRNAME_DEFAULT)) in ceph_show_options()
738 seq_show_option(m, "snapdirname", fsopt->snapdir_name); in ceph_show_options()
769 static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt, in create_fs_client() argument
791 if (!fsopt->mds_namespace) { in create_fs_client()
799 fsc->mount_options = fsopt; in create_fs_client()
838 destroy_mount_options(fsopt); in create_fs_client()
1141 struct ceph_mount_options *fsopt = new->mount_options; in ceph_compare_super() local
1147 if (compare_mount_options(fsopt, opt, fsc)) { in ceph_compare_super()
1200 struct ceph_mount_options *fsopt = pctx->opts; in ceph_get_tree() local
1212 if (fsopt->new_dev_syntax && !fsopt->mon_addr) in ceph_get_tree()
1291 struct ceph_mount_options *fsopt = pctx->opts; in ceph_reconfigure_fc() local
1294 if (fsopt->flags & CEPH_MOUNT_OPT_ASYNC_DIROPS) in ceph_reconfigure_fc()
1299 if (strcmp_null(fsc->mount_options->mon_addr, fsopt->mon_addr)) { in ceph_reconfigure_fc()
1301 fsc->mount_options->mon_addr = fsopt->mon_addr; in ceph_reconfigure_fc()
1302 fsopt->mon_addr = NULL; in ceph_reconfigure_fc()
1323 struct ceph_mount_options *fsopt; in ceph_init_fs_context() local
1337 fsopt = pctx->opts; in ceph_init_fs_context()
1338 fsopt->flags = CEPH_MOUNT_OPT_DEFAULT; in ceph_init_fs_context()
1340 fsopt->wsize = CEPH_MAX_WRITE_SIZE; in ceph_init_fs_context()
1341 fsopt->rsize = CEPH_MAX_READ_SIZE; in ceph_init_fs_context()
1342 fsopt->rasize = CEPH_RASIZE_DEFAULT; in ceph_init_fs_context()
1343 fsopt->snapdir_name = kstrdup(CEPH_SNAPDIRNAME_DEFAULT, GFP_KERNEL); in ceph_init_fs_context()
1344 if (!fsopt->snapdir_name) in ceph_init_fs_context()
1347 fsopt->caps_wanted_delay_min = CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT; in ceph_init_fs_context()
1348 fsopt->caps_wanted_delay_max = CEPH_CAPS_WANTED_DELAY_MAX_DEFAULT; in ceph_init_fs_context()
1349 fsopt->max_readdir = CEPH_MAX_READDIR_DEFAULT; in ceph_init_fs_context()
1350 fsopt->max_readdir_bytes = CEPH_MAX_READDIR_BYTES_DEFAULT; in ceph_init_fs_context()
1351 fsopt->congestion_kb = default_congestion_kb(); in ceph_init_fs_context()