Skip to content

Commit 0e4a0ee

Browse files
authored
Merge pull request ceph#61471 from idryomov/wip-65889-more
cls/rbd: don't use read API for write-like methods Reviewed-by: Ramana Raja <[email protected]>
2 parents ae82b04 + 4612195 commit 0e4a0ee

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cls/rbd/cls_rbd_client.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,9 +1819,9 @@ int mirror_uuid_set(librados::IoCtx *ioctx, const std::string &uuid) {
18191819
bufferlist in_bl;
18201820
encode(uuid, in_bl);
18211821

1822-
bufferlist out_bl;
1823-
int r = ioctx->exec(RBD_MIRRORING, "rbd", "mirror_uuid_set", in_bl,
1824-
out_bl);
1822+
librados::ObjectWriteOperation op;
1823+
op.exec("rbd", "mirror_uuid_set", in_bl);
1824+
int r = ioctx->operate(RBD_MIRRORING, &op);
18251825
if (r < 0) {
18261826
return r;
18271827
}
@@ -1907,9 +1907,9 @@ int mirror_remote_namespace_set(librados::IoCtx *ioctx,
19071907
bufferlist in_bl;
19081908
encode(mirror_namespace, in_bl);
19091909

1910-
bufferlist out_bl;
1911-
int r = ioctx->exec(RBD_MIRRORING, "rbd", "mirror_remote_namespace_set",
1912-
in_bl, out_bl);
1910+
librados::ObjectWriteOperation op;
1911+
op.exec("rbd", "mirror_remote_namespace_set", in_bl);
1912+
int r = ioctx->operate(RBD_MIRRORING, &op);
19131913
if (r < 0) {
19141914
return r;
19151915
}

0 commit comments

Comments
 (0)