Lines Matching refs:ctx
370 static void erofs_default_options(struct erofs_fs_context *ctx)
373 ctx->opt.cache_strategy = EROFS_ZIP_CACHE_READAROUND;
374 ctx->opt.max_sync_decompress_pages = 3;
375 ctx->opt.sync_decompress = EROFS_SYNC_DECOMPRESS_AUTO;
378 set_opt(&ctx->opt, XATTR_USER);
381 set_opt(&ctx->opt, POSIX_ACL);
426 struct erofs_fs_context *ctx = fc->fs_private;
431 set_opt(&ctx->opt, DAX_ALWAYS);
432 clear_opt(&ctx->opt, DAX_NEVER);
435 set_opt(&ctx->opt, DAX_NEVER);
436 clear_opt(&ctx->opt, DAX_ALWAYS);
451 struct erofs_fs_context *ctx = fc->fs_private;
464 set_opt(&ctx->opt, XATTR_USER);
466 clear_opt(&ctx->opt, XATTR_USER);
474 set_opt(&ctx->opt, POSIX_ACL);
476 clear_opt(&ctx->opt, POSIX_ACL);
483 ctx->opt.cache_strategy = result.uint_32;
505 down_write(&ctx->devs->rwsem);
506 ret = idr_alloc(&ctx->devs->tree, dif, 0, 0, GFP_KERNEL);
507 up_write(&ctx->devs->rwsem);
513 ++ctx->devs->extra_devices;
517 kfree(ctx->fsid);
518 ctx->fsid = kstrdup(param->string, GFP_KERNEL);
519 if (!ctx->fsid)
523 kfree(ctx->domain_id);
524 ctx->domain_id = kstrdup(param->string, GFP_KERNEL);
525 if (!ctx->domain_id)
582 struct erofs_fs_context *ctx = fc->fs_private;
595 sbi->opt = ctx->opt;
596 sbi->devs = ctx->devs;
597 ctx->devs = NULL;
598 sbi->fsid = ctx->fsid;
599 ctx->fsid = NULL;
600 sbi->domain_id = ctx->domain_id;
601 ctx->domain_id = NULL;
706 struct erofs_fs_context *ctx = fc->fs_private;
708 if (IS_ENABLED(CONFIG_EROFS_FS_ONDEMAND) && ctx->fsid)
718 struct erofs_fs_context *ctx = fc->fs_private;
722 if (ctx->fsid || ctx->domain_id)
725 if (test_opt(&ctx->opt, POSIX_ACL))
730 sbi->opt = ctx->opt;
761 struct erofs_fs_context *ctx = fc->fs_private;
763 erofs_free_dev_context(ctx->devs);
764 kfree(ctx->fsid);
765 kfree(ctx->domain_id);
766 kfree(ctx);
778 struct erofs_fs_context *ctx;
780 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
781 if (!ctx)
783 ctx->devs = kzalloc(sizeof(struct erofs_dev_context), GFP_KERNEL);
784 if (!ctx->devs) {
785 kfree(ctx);
788 fc->fs_private = ctx;
790 idr_init(&ctx->devs->tree);
791 init_rwsem(&ctx->devs->rwsem);
792 erofs_default_options(ctx);