Add missing spaces, don't use the word stream when reporting errors
on POSIX file operations (open() and lseek64()) and fix a cut-and-paste
typo in RawSnapshot.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit
789df2ce38f35ffb3e86974e02868e5fff71e72c)
auto offset = lseek64(file_stream->m_file_no, byte_extent.first, SEEK_SET);
if (offset == -1) {
r = -errno;
- lderr(cct) << "failed to seek file stream: " << cpp_strerror(r) << dendl;
+ lderr(cct) << "failed to seek file: " << cpp_strerror(r) << dendl;
finish(r);
return;
}
m_file_no = ::open(file_path.c_str(), O_RDONLY);
if (m_file_no < 0) {
int r = -errno;
- lderr(m_cct) << "failed to open file stream '" << file_path << "': "
+ lderr(m_cct) << "failed to open file '" << file_path << "': "
<< cpp_strerror(r) << dendl;
on_finish->complete(r);
return;
ldout(cct, 15) << "r=" << r << dendl;
if (r < 0) {
- lderr(cct) << "failed to disconnect stream: '" << cpp_strerror(r)
+ lderr(cct) << "failed to disconnect stream: " << cpp_strerror(r)
<< dendl;
}
ldout(cct, 15) << "r=" << r << dendl;
if (r < 0) {
- lderr(cct) << "failed to disconnect stream: '" << cpp_strerror(r)
+ lderr(cct) << "failed to disconnect stream: " << cpp_strerror(r)
<< dendl;
}
int r = source_spec_builder.parse_source_spec(source_spec,
&source_spec_object);
if (r < 0) {
- lderr(m_cct) << "failed to parse migration source-spec:" << cpp_strerror(r)
- << dendl;
+ lderr(m_cct) << "failed to parse migration source-spec: "
+ << cpp_strerror(r) << dendl;
(*m_src_image_ctx)->state->close();
finish(r);
return;
int r = m_source_spec_builder->build_stream(m_json_object, &m_stream);
if (r < 0) {
- lderr(cct) << "failed to build migration stream handler" << cpp_strerror(r)
- << dendl;
+ lderr(cct) << "failed to build migration stream handler: "
+ << cpp_strerror(r) << dendl;
on_finish->complete(r);
return;
}
int r = m_source_spec_builder->build_stream(m_json_object, &m_stream);
if (r < 0) {
- lderr(cct) << "failed to build migration stream handler" << cpp_strerror(r)
- << dendl;
+ lderr(cct) << "failed to build migration stream handler: "
+ << cpp_strerror(r) << dendl;
on_finish->complete(r);
return;
}
snapshot->reset(RawSnapshot<I>::create(m_image_ctx, source_spec_object,
this, index));
} else {
- lderr(cct) << "unknown or unsupported format type '" << type << "'"
+ lderr(cct) << "unknown or unsupported snapshot type '" << type << "'"
<< dendl;
return -ENOSYS;
}