path: root/gluster/swift/obj/
diff options
authorPrashanth Pai <>2016-03-07 14:38:05 +0530
committerThiago da Silva <>2016-03-07 11:58:41 -0800
commitd7af577eb42e4c8bbdcadbb45a46d3a37c98193e (patch)
treecbf5c201ad201d731606550f19bad2edc9d441d0 /gluster/swift/obj/
parentea4750a366123f78411d90082733642376dc6afc (diff)
Remove redundant syscalls in GET path
This change removes redundant fstat() and fgetxattr() performed in the GET path when object added from file interface is being accessed for the first time via the object interface. This is a manual backport of this change: Change-Id: I29f56cef80c94779145e2948ba14f35817d46e0c Signed-off-by: Prashanth Pai <> Reviewed-on: Reviewed-by: Thiago da Silva <> Tested-by: Thiago da Silva <>
Diffstat (limited to 'gluster/swift/obj/')
1 files changed, 2 insertions, 2 deletions
diff --git a/gluster/swift/obj/ b/gluster/swift/obj/
index 21e6cee..b776d0f 100644
--- a/gluster/swift/obj/
+++ b/gluster/swift/obj/
@@ -611,8 +611,8 @@ class DiskFile(object):
self._metadata = read_metadata(self._fd)
if not validate_object(self._metadata, self._stat):
- create_object_metadata(self._fd)
- self._metadata = read_metadata(self._fd)
+ self._metadata = create_object_metadata(self._fd, self._stat,
+ self._metadata)
assert self._metadata is not None