mirror of
https://github.com/ceph/ceph
synced 2025-04-01 14:51:13 +00:00
librbd: return actual error when detecting format fails during creation
This bit a couple users today, when bad osd caps resulted in a very confusing error message. Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
ca9f93aa37
commit
cda9e516b8
@ -672,8 +672,8 @@ reprotect_and_return_err:
|
||||
// make sure it doesn't already exist, in either format
|
||||
int r = detect_format(io_ctx, imgname, NULL, NULL);
|
||||
if (r != -ENOENT) {
|
||||
lderr(cct) << "rbd image " << imgname << " already exists" << dendl;
|
||||
return -EEXIST;
|
||||
lderr(cct) << "Could not tell if " << imgname << " already exists" << dendl;
|
||||
return r;
|
||||
}
|
||||
|
||||
if (!order)
|
||||
|
Loading…
Reference in New Issue
Block a user