From: hechuang Date: Mon, 13 Mar 2017 07:00:26 +0000 (+0800) Subject: rgw: fix configurable write obj window size X-Git-Tag: v12.0.2~202^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f525e8fe00d90b840a17ece5f52a3bdb02e62ed;p=ceph.git rgw: fix configurable write obj window size Should use read_len in the copy_obj_data() function, "end-ofs+1" is not necessarily the written. Signed-off-by: hechuang --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index af00d1980ce9..12d05d6979d5 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -7684,7 +7684,7 @@ int RGWRados::copy_obj_data(RGWObjectCtx& obj_ctx, if (ret < 0) { return ret; } - ret = processor.throttle_data(handle, obj, end - ofs + 1, false); + ret = processor.throttle_data(handle, obj, read_len, false); if (ret < 0) return ret; } while (again);