From: Casey Bodley Date: Thu, 23 Mar 2017 16:26:59 +0000 (-0400) Subject: rgw: stat requests skip compression, manifest handling, etc X-Git-Tag: v12.0.2~192^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a07cee029df1966aacf0b8f553b618ae01878364;p=ceph.git 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 --- 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;