From a07cee029df1966aacf0b8f553b618ae01878364 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 23 Mar 2017 12:26:59 -0400 Subject: [PATCH] rgw: stat requests skip compression, manifest handling, etc the early return for stat requests in RGWGetObj::execute() can happen as soon as we've read the head object Signed-off-by: Casey Bodley --- src/rgw/rgw_op.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 468d4f85ad88..ceeaf39a2a6b 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -1396,6 +1396,11 @@ void RGWGetObj::execute() if (op_ret < 0) goto done_err; + /* STAT ops don't need data, and do no i/o */ + if (get_type() == RGW_OP_STAT_OBJ) { + return; + } + /* start gettorrent */ if (torrent.get_flag()) { @@ -1472,11 +1477,6 @@ void RGWGetObj::execute() start = ofs; - /* STAT ops don't need data, and do no i/o */ - if (get_type() == RGW_OP_STAT_OBJ) { - return; - } - if (!get_data || ofs > end) { send_response_data(bl, 0, 0); return; -- 2.47.3