Project

General

Profile

Bug #20240 ยป libradosstriper_format.patch

Stan K, 06/09/2017 04:20 PM

View differences:

src/libradosstriper/RadosStriperImpl.cc
*
*/
#include <boost/algorithm/string/replace.hpp>
#include "libradosstriper/RadosStriperImpl.h"
#include <errno.h>
......
// get list of extents to be read from
vector<ObjectExtent> *extents = new vector<ObjectExtent>();
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,
......
{
// get list of extents to be written to
vector<ObjectExtent> 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);
    (1-1/1)