Skip to content

Commit

Permalink
rbd: don't use ENOTSUPP
Browse files Browse the repository at this point in the history
ENOTSUPP is not a standard errno (it shows up as "Unknown error 524"
in an error message).  This is what was getting produced when the
the local rbd code does not implement features required by a
discovered rbd image.

Change the error code returned in this case to ENXIO.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
  • Loading branch information
Alex Elder authored and Alex Elder committed Dec 17, 2012
1 parent 61c7403 commit b8f5c6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2456,7 +2456,7 @@ static int _rbd_dev_v2_snap_features(struct rbd_device *rbd_dev, u64 snap_id,

incompat = le64_to_cpu(features_buf.incompat);
if (incompat & ~RBD_FEATURES_ALL)
return -ENOTSUPP;
return -ENXIO;

*snap_features = le64_to_cpu(features_buf.features);

Expand Down

0 comments on commit b8f5c6e

Please sign in to comment.