From: Sage Weil Date: Wed, 24 Jan 2018 03:07:08 +0000 (-0600) Subject: os/bluestore: change bdev parse error to ENOENT X-Git-Tag: v12.2.3~24^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=91673b1edfd3d4023d77eb95801db6acf7f900f9;p=ceph.git os/bluestore: change bdev parse error to ENOENT 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 (cherry picked from commit 5cd98b0dfdc7758761ff789b12faca2266a7e128) --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 044ffdc94f5..6d6201bb582 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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