Lines Matching refs:pctx
6259 struct rbd_parse_opts_ctx *pctx)
6261 struct rbd_options *opt = pctx->opts;
6266 ret = ceph_parse_param(param, pctx->copts, NULL);
6299 kfree(pctx->spec->pool_ns);
6300 pctx->spec->pool_ns = param->string;
6355 static int rbd_parse_options(char *options, struct rbd_parse_opts_ctx *pctx)
6383 ret = rbd_parse_param(¶m, pctx);
6444 struct rbd_parse_opts_ctx pctx = { 0 };
6467 pctx.spec = rbd_spec_alloc();
6468 if (!pctx.spec)
6471 pctx.spec->pool_name = dup_token(&buf, NULL);
6472 if (!pctx.spec->pool_name)
6474 if (!*pctx.spec->pool_name) {
6479 pctx.spec->image_name = dup_token(&buf, NULL);
6480 if (!pctx.spec->image_name)
6482 if (!*pctx.spec->image_name) {
6503 pctx.spec->snap_name = snap_name;
6505 pctx.copts = ceph_alloc_options();
6506 if (!pctx.copts)
6511 pctx.opts = kzalloc(sizeof(*pctx.opts), GFP_KERNEL);
6512 if (!pctx.opts)
6515 pctx.opts->read_only = RBD_READ_ONLY_DEFAULT;
6516 pctx.opts->queue_depth = RBD_QUEUE_DEPTH_DEFAULT;
6517 pctx.opts->alloc_size = RBD_ALLOC_SIZE_DEFAULT;
6518 pctx.opts->lock_timeout = RBD_LOCK_TIMEOUT_DEFAULT;
6519 pctx.opts->lock_on_read = RBD_LOCK_ON_READ_DEFAULT;
6520 pctx.opts->exclusive = RBD_EXCLUSIVE_DEFAULT;
6521 pctx.opts->trim = RBD_TRIM_DEFAULT;
6523 ret = ceph_parse_mon_ips(mon_addrs, mon_addrs_size, pctx.copts, NULL,
6528 ret = rbd_parse_options(options, &pctx);
6532 *ceph_opts = pctx.copts;
6533 *opts = pctx.opts;
6534 *rbd_spec = pctx.spec;
6541 kfree(pctx.opts);
6542 ceph_destroy_options(pctx.copts);
6543 rbd_spec_put(pctx.spec);