Navigation Menu

Skip to content

Commit

Permalink
rbd-mirror: set SEQUENTIAL and NOCACHE advise flags on image sync
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/17127
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 1167865)
  • Loading branch information
Mykola Golub authored and Abhishek Varshney committed Dec 20, 2016
1 parent 2a8ef5b commit 43f5a3b
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 43f5a3b

Please sign in to comment.