Skip to content

Commit

Permalink
rbd: update feature bits
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Josh Durgin <[email protected]>
  • Loading branch information
Alex Elder authored and Sage Weil committed May 2, 2013
1 parent 04017e2 commit 5cbf6f1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,14 @@

/* 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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5cbf6f1

Please sign in to comment.