Signed-off-by: weixinwei <xinweiwei90@gmail.com>
(cherry picked from commit
8baa6ce567064a13b27e20b1a755bb2e5e871ebd)
Conflicts:
src/os/bluestore/BlueFS.cc
the line is wrapped in "if (out) {}" in nautilus but is
otherwise identical
<< dendl;
if (out) {
- // NOTE: h->bl is normally a contiguous buffer so c_str() is free.
- memcpy(out, buf->bl.c_str() + off - buf->bl_off, r);
+ auto p = buf->bl.begin();
+ p.seek(off - buf->bl_off);
+ p.copy(r, out);
out += r;
}
outbl->claim_append(t);
}
if (out) {
- // NOTE: h->bl is normally a contiguous buffer so c_str() is free.
- memcpy(out, buf->bl.c_str() + off - buf->bl_off, r);
+ auto p = buf->bl.begin();
+ p.seek(off - buf->bl_off);
+ p.copy(r, out);
out += r;
}