Open()ing an object is necessarry only in two cases:
* Serving a GET request
* Recalculating etag when metadata is stale
(can be triggered by any type of request)
This change ensures that for requests other than GET, a file is not
opened if the metadata is valid (size and etag accurate). Note that
if metadata is stale, the file is still opened and read to compute etag.
This patch does not change the behaviour of triggering metadata
validation and regeneration for non-GET requests.
This is a port of following change:
http://review.gluster.org/#/c/13684/
Change-Id: I54caf2242dfe94c1feb1060abfba971f862587fa
Signed-off-by: Prashanth Pai <ppai@redhat.com>