diff --git a/src/libradosstriper/RadosStriperImpl.cc b/src/libradosstriper/RadosStriperImpl.cc index 22352d9125..70dcb7569f 100644 --- a/src/libradosstriper/RadosStriperImpl.cc +++ b/src/libradosstriper/RadosStriperImpl.cc @@ -12,6 +12,8 @@ * */ +#include + #include "libradosstriper/RadosStriperImpl.h" #include @@ -466,7 +468,9 @@ int libradosstriper::RadosStriperImpl::aio_read(const std::string& soid, // get list of extents to be read from vector *extents = new vector(); if (read_len > 0) { - std::string format = soid + RADOS_OBJECT_EXTENSION_FORMAT; + std::string format = soid; + boost::replace_all(format, "%", "%%"); + format += RADOS_OBJECT_EXTENSION_FORMAT; file_layout_t l; l.from_legacy(layout); Striper::file_to_extents(cct(), format.c_str(), &l, off, read_len, @@ -776,7 +780,9 @@ libradosstriper::RadosStriperImpl::internal_aio_write(const std::string& soid, if (len > 0) { // get list of extents to be written to vector extents; - std::string format = soid + RADOS_OBJECT_EXTENSION_FORMAT; + std::string format = soid; + boost::replace_all(format, "%", "%%"); + format += RADOS_OBJECT_EXTENSION_FORMAT; file_layout_t l; l.from_legacy(layout); Striper::file_to_extents(cct(), format.c_str(), &l, off, len, 0, extents);