diff --git a/README.md b/README.md index c3be892a..b4d70156 100644 --- a/README.md +++ b/README.md @@ -96,14 +96,14 @@ o- backstores .......................................................... [...] /backstores> cd user:rbd -/backstores/user:rbd> create cfgstring=pool/rbd1/osd_op_timeout=30 name=rbd0 size=1G +/backstores/user:rbd> create cfgstring=pool/rbd1;osd_op_timeout=30 name=rbd0 size=1G Created user-backed storage object rbd0 size 1073741824. Note that the cfgstring is handler specific. The format is: (osd_op_timeout is optional and N is in seconds) -rbd: /pool_name/image_name/osd_op_timeout=N +rbd: /pool_name/image_name[;osd_op_timeout=N] qcow: /path_to_file glfs: /volume@hostname/filename diff --git a/rbd.c b/rbd.c index 82d368c3..c6a62ee9 100644 --- a/rbd.c +++ b/rbd.c @@ -548,7 +548,7 @@ static int tcmu_rbd_open(struct tcmu_device *dev) goto free_config; } - name = strtok(NULL, "/"); + name = strtok(NULL, ";"); if (!name) { tcmu_dev_err(dev, "Could not get image name\n"); ret = -EINVAL; @@ -563,7 +563,7 @@ static int tcmu_rbd_open(struct tcmu_device *dev) } /* The next options are optional */ - next_opt = strtok(NULL, "/"); + next_opt = strtok(NULL, ";"); if (next_opt) { if (!strncmp(next_opt, "osd_op_timeout=", 15)) { state->osd_op_timeout = strdup(next_opt + 15);