]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: change bdev parse error to ENOENT 20090/head
authorSage Weil <sage@redhat.com>
Wed, 24 Jan 2018 03:07:08 +0000 (21:07 -0600)
committerSage Weil <sage@redhat.com>
Wed, 24 Jan 2018 03:07:08 +0000 (21:07 -0600)
If there is not a valid label, then the label is not found.  This is a
more reasonable error code than "Invalid argumnet".

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index b3e9553be271d1c0426795a4ba99d8228ff95add..5dc92421514b25e576341f0fca2a24fcd8add1eb 100644 (file)
@@ -4203,7 +4203,7 @@ int BlueStore::_read_bdev_label(CephContext* cct, string path,
     dout(2) << __func__ << " unable to decode label at offset " << p.get_off()
         << ": " << e.what()
         << dendl;
-    return -EINVAL;
+    return -ENOENT;
   }
   if (crc != expected_crc) {
     derr << __func__ << " bad crc on label, expected " << expected_crc