Project

General

Profile

Bug #14814

os/filestore: mkfs may return OK even if it encounters internal error.

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

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
02/19/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

uint64_t initial_seq = 0;
int fd = read_op_seq(&initial_seq);
if (fd < 0) {
derr << "mkfs: failed to create " << current_op_seq_fn << ": "
<< cpp_strerror(fd) << dendl;
goto close_fsid_fd;
}

Associated revisions

Revision 68f300dd (diff)
Added by xie xingguo over 3 years ago

os/filestore: fix wrong scope of result code for error cases during mkfs

During the mkfs process, if we fail to read and sometimes rewrite the
op_seq, the mkfs process is abnormally terminated but we may
still return a positive answer to the caller, which is misleading.

This patch is provided to solve the above problems by correctly setting
'ret' correspondingly under these cases, which is the final answer to
be passed out for caller.

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

History

#1 Updated by Sage Weil over 3 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF