]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: change bdev parse error to ENOENT 20326/head
authorSage Weil <sage@redhat.com>
Wed, 24 Jan 2018 03:07:08 +0000 (21:07 -0600)
committerAbhishek Lekshmanan <abhishek@suse.com>
Mon, 5 Feb 2018 18:23:30 +0000 (19:23 +0100)
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>
(cherry picked from commit 5cd98b0dfdc7758761ff789b12faca2266a7e128)

src/os/bluestore/BlueStore.cc

index 044ffdc94f5696335215690effba572f8081a3f8..6d6201bb582f3ca71da3a20a063c5ee6c772ae38 100644 (file)
@@ -4094,7 +4094,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