Skip to contentSkip to conversation

rbd: activate support for layered images

PATCH In review Alex Elder 2 participants 3 messages Apr 21, 2013 – Apr 22, 2013

Subsystems (2)
lore
Share & tools
lore

Alex Elder

author
#0 lore raw

PATCH 1/1 rbd: activate support for layered images

(This patch and the next one are available in the "review/wip-enable-layering" branch of the ceph-client git respository.)

Now that we have most everything in place to support layered rbd images, enable support for them in the kernel client. Issue a warning to the log that the support is considered experimental whenever a format 2 layered image is mapped.

Note that we also have to claim to support the STRIPINGV2 feature, due to a mistake in the way the rbd CLI set up those flags. This feature can work if it has the right parameters, and safeguards have been put in place to reject those images that do not have compatible parameters.

---
 drivers/block/rbd.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/block/rbd.c +1 -1
index d23cc8f..1ddbcdc 100644
@@ -80,7 +80,7 @@
 
 /* Features supported by this (client software) implementation. */
 
-#define RBD_FEATURES_SUPPORTED	(0)
+#define RBD_FEATURES_SUPPORTED	(RBD_FEATURES_ALL)
 
 /*
  * An RBD device name will be "rbd#", where the "rbd" comes from
@@ -4723,6 +4723,8 @@ static int rbd_dev_v2_probe(struct rbd_device

*rbd_dev)
ret = rbd_dev_v2_parent_info(rbd_dev); if (ret)
goto out_err;
+ rbd_warn(rbd_dev, "WARNING: layered rbd image support "
+ "is EXPERIMENTAL!");
}

/* If the image supports fancy striping, get its parameters */

Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 35 lines · Alex Elder

(This patch and the next one are available in the "review/wip-enable-layering" branch of the ceph-client git respository.)

Now that we have most everything in place to support layered rbd images, enable support for them in the kernel client. Issue a warning to the log that the support is considered experimental whenever a format 2 layered image is mapped.

Note that we also have to claim to support the STRIPINGV2 feature, due to a mistake in the way the rbd CLI set up those flags. This feature can work if it has the right parameters, and safeguards have been put in place to reject those images that do not have compatible parameters.

---
  drivers/block/rbd.c |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
drivers/block/rbd.c +1 -1
index d23cc8f..1ddbcdc 100644
@@ -80,7 +80,7 @@
 
  /* Features supported by this (client software) implementation. */
 
-#define RBD_FEATURES_SUPPORTED	(0)
+#define RBD_FEATURES_SUPPORTED	(RBD_FEATURES_ALL)
 
  /*
   * An RBD device name will be "rbd#", where the "rbd" comes from

drivers/block/rbd.c static int rbd_dev_v2_probe(struct rbd_device · line 4728

Quoted 6 lines
drivers/block/rbd.c +2 -0
@@ -4723,6 +4723,8 @@ static int rbd_dev_v2_probe(struct rbd_device
 *rbd_dev)
  		ret = rbd_dev_v2_parent_info(rbd_dev);
  		if (ret)
  			goto out_err;
+		rbd_warn(rbd_dev, "WARNING: layered rbd image support "
+					"is EXPERIMENTAL!");

Maybe add "for the kernel rbd driver" or something, since librbd support isn't experimental. If you're removing this warning soon it doesn't matter though. Either way is fine with me.

author
#2 lore raw
Quoted 33 lines · Josh Durgin
Quoted 32 lines · Alex Elder

(This patch and the next one are available in the "review/wip-enable-layering" branch of the ceph-client git respository.)

Now that we have most everything in place to support layered rbd images, enable support for them in the kernel client. Issue a warning to the log that the support is considered experimental whenever a format 2 layered image is mapped.

Note that we also have to claim to support the STRIPINGV2 feature, due to a mistake in the way the rbd CLI set up those flags. This feature can work if it has the right parameters, and safeguards have been put in place to reject those images that do not have compatible parameters.

---
  drivers/block/rbd.c |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
drivers/block/rbd.c +1 -1
index d23cc8f..1ddbcdc 100644
@@ -80,7 +80,7 @@
 
  /* Features supported by this (client software) implementation. */
 
-#define RBD_FEATURES_SUPPORTED    (0)
+#define RBD_FEATURES_SUPPORTED    (RBD_FEATURES_ALL)
 
Quoted 13 lines

drivers/block/rbd.c static int rbd_dev_v2_probe(struct rbd_device · line 4728

Quoted 9 lines
drivers/block/rbd.c +2 -0
  /*
   * An RBD device name will be "rbd#", where the "rbd" comes from
@@ -4723,6 +4723,8 @@ static int rbd_dev_v2_probe(struct rbd_device
 *rbd_dev)
          ret = rbd_dev_v2_parent_info(rbd_dev);
          if (ret)
              goto out_err;
+        rbd_warn(rbd_dev, "WARNING: layered rbd image support "
+                    "is EXPERIMENTAL!");

Maybe add "for the kernel rbd driver" or something, since librbd support isn't experimental. If you're removing this warning soon it doesn't matter though. Either way is fine with me.

I'll reword it slightly. Thanks a lot for all the reviews, Josh.

-Alex

Quoted 3 lines