diff mbox

[4/5] rbd: don't use ENOTSUPP

Message ID 50927F4A.1090404@inktank.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Elder Nov. 1, 2012, 1:55 p.m. UTC
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>
---
 drivers/block/rbd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 6512a8e..3378963 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2465,7 +2465,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);