Skip to content

Commit

Permalink
Merge pull request #12280 from trociny/wip-17127
Browse files Browse the repository at this point in the history
rbd-mirror: set SEQUENTIAL and NOCACHE advise flags on image sync

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
  • Loading branch information
Jason Dillaman committed Dec 2, 2016
2 parents 4951fbc + 1167865 commit 98709d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tools/rbd_mirror/image_sync/ObjectCopyRequest.cc
Expand Up @@ -114,6 +114,8 @@ void ObjectCopyRequest<I>::send_read_object() {
<< std::get<2>(sync_op) << dendl;
op.sparse_read(std::get<1>(sync_op), std::get<2>(sync_op), &std::get<4>(sync_op),
&std::get<3>(sync_op), nullptr);
op.set_op_flags2(LIBRADOS_OP_FLAG_FADVISE_SEQUENTIAL |
LIBRADOS_OP_FLAG_FADVISE_NOCACHE);
break;
default:
break;
Expand Down Expand Up @@ -182,6 +184,8 @@ void ObjectCopyRequest<I>::send_write_object() {
bufferlist tmpbl;
tmpbl.substr_of(std::get<3>(sync_op), buffer_offset, it.second);
op.write(it.first, tmpbl);
op.set_op_flags2(LIBRADOS_OP_FLAG_FADVISE_SEQUENTIAL |
LIBRADOS_OP_FLAG_FADVISE_NOCACHE);
buffer_offset += it.second;
dout(20) << ": write op: " << it.first<< "~" << it.second << dendl;
}
Expand Down

0 comments on commit 98709d9

Please sign in to comment.