Project

General

Profile

Bug #14817

os/filestore: result code of fstat overwritten

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

Status:
Resolved
Priority:
Normal
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:

Associated revisions

Revision 877eae85 (diff)
Added by xie xingguo about 3 years ago

os/filestore: fix result code overwritten for clone

During the clone process, the result code of syscall-fstat which is intend for
getting the source size for copying is not checked and will be overwritten
by the following call, which is of potential risk and thus should be considered
as unsafe.

This pr solves the above problem by adding result checking against failure.
Also result code is reset to errno for better tracing if the ftruncate syscall
failed.

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

History

#1 Updated by Sage Weil about 3 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF