]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rbd: update feature bits
authorAlex Elder <elder@inktank.com>
Thu, 11 Apr 2013 14:29:48 +0000 (09:29 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:18:36 +0000 (21:18 -0700)
There is a new rbd feature bit defined for "fancy striping." Add
it to the ones defined in the kernel client.

Change RBD_FEATURES_ALL so it represents the set of all feature
bits (rather than just the ones we support).  Define a new symbol
RBD_FEATURES_SUPPORTED to indicate the supported ones.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c

index 11b7987cb75f5690581c6c8c3760b6488a41cbc4..503e64f51fe17c191974b3b53d6b7e109c7264c0 100644 (file)
 
 /* Feature bits */
 
-#define RBD_FEATURE_LAYERING      1
+#define RBD_FEATURE_LAYERING   (1<<0)
+#define RBD_FEATURE_STRIPINGV2 (1<<1)
+#define RBD_FEATURES_ALL \
+           (RBD_FEATURE_LAYERING | RBD_FEATURE_STRIPINGV2)
 
 /* Features supported by this (client software) implementation. */
 
-#define RBD_FEATURES_ALL          (0)
+#define RBD_FEATURES_SUPPORTED (0)
 
 /*
  * An RBD device name will be "rbd#", where the "rbd" comes from
@@ -2843,7 +2846,7 @@ static int _rbd_dev_v2_snap_features(struct rbd_device *rbd_dev, u64 snap_id,
                return ret;
 
        incompat = le64_to_cpu(features_buf.incompat);
-       if (incompat & ~RBD_FEATURES_ALL)
+       if (incompat & ~RBD_FEATURES_SUPPORTED)
                return -ENXIO;
 
        *snap_features = le64_to_cpu(features_buf.features);