diff options
author | Radoslaw Zarzynski <rzarzynski@mirantis.com> | 2016-08-12 15:46:55 +0200 |
---|---|---|
committer | Radoslaw Zarzynski <rzarzynski@mirantis.com> | 2016-10-21 22:57:20 +0200 |
commit | ed2bf828cf10e1c5c0e7296454c288a9517ed26f (patch) | |
tree | d3917e650ae436feac9fde10ab2c9178db657800 /src/rgw/rgw_rest_metadata.cc | |
parent | rgw: implement RGWStreamIOEngine::{send,recv}_body(). (diff) | |
download | ceph-ed2bf828cf10e1c5c0e7296454c288a9517ed26f.tar.xz ceph-ed2bf828cf10e1c5c0e7296454c288a9517ed26f.zip |
rgw: switch to RGWStreamIOEngine::{send,recv}_body().
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
Diffstat (limited to 'src/rgw/rgw_rest_metadata.cc')
-rw-r--r-- | src/rgw/rgw_rest_metadata.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rgw/rgw_rest_metadata.cc b/src/rgw/rgw_rest_metadata.cc index 8f02b0fbaa1..396f72b3bc2 100644 --- a/src/rgw/rgw_rest_metadata.cc +++ b/src/rgw/rgw_rest_metadata.cc @@ -119,13 +119,13 @@ int RGWOp_Metadata_Put::get_data(bufferlist& bl) { if (!data) { return -ENOMEM; } - int r = STREAM_IO(s)->read(data, cl, &read_len); + read_len = recv_body(s, data, cl); if (cl != (size_t)read_len) { - dout(10) << "cio->read incomplete" << dendl; + dout(10) << "recv_body incomplete" << dendl; } - if (r < 0) { + if (read_len < 0) { free(data); - return r; + return read_len; } bl.append(data, read_len); } else { @@ -139,10 +139,10 @@ int RGWOp_Metadata_Put::get_data(bufferlist& bl) { return -ENOMEM; } do { - int r = STREAM_IO(s)->read(data, chunk_size, &read_len); - if (r < 0) { + read_len = recv_body(s, data, chunk_size); + if (read_len < 0) { free(data); - return r; + return read_len; } bl.append(data, read_len); } while (read_len == chunk_size); |