From 7f525e8fe00d90b840a17ece5f52a3bdb02e62ed Mon Sep 17 00:00:00 2001 From: hechuang Date: Mon, 13 Mar 2017 15:00:26 +0800 Subject: [PATCH] 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 --- src/rgw/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index af00d1980ce..12d05d6979d 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); -- 2.47.3