Project

General

Profile

Bug #14228

MemStore: error code other than ENOENT not processed

Added by xie xingguo over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
01/05/2016
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

int MemStore::mkfs() {
string fsid_str;
int r = read_meta("fs_fsid", &fsid_str);
if (r == -ENOENT) {
uuid_d fsid;
fsid.generate_random();
fsid_str = stringify(fsid);
r = write_meta("fs_fsid", fsid_str);
if (r < 0)
return r;
dout(1) << func << " new fsid " << fsid_str << dendl;
} else {
dout(1) << func << " had fsid " << fsid_str << dendl;
}

Associated revisions

Revision 6c55cec6 (diff)
Added by xie xingguo over 3 years ago

os: fix unhandled error other than ENOENT

Fixes: #14228
Signed-off-by: xie xingguo <>

Also available in: Atom PDF