Red Hat Bugzilla – Bug 868086
Fetching the object metadata involves multiple stat() system calls when one suffices
Last modified: 2016-11-08 17:26:29 EST
Description of problem:
Generating, or regenerating, metadata for an object (not a container or
account) involves multiple stat system calls when one will suffice.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. strace object-server process
2. PUT a new object
3. GET that object
4. Observe stat system calls made in strace output
Multiple stat system calls made.
One system call made on behalf of the GET operation.
See http://pastebin.test.redhat.com/110818 from lines 226 through 243,
you'll notice the following stat() and fstat() calls made to the file
being fetched ("testfile.txt"):
* Line 226, stat()
* Line 235, stat()
* Line 237, fstat() of same file open'd on fd 15
* Line 238, stat()
* Line 243, fstat() of same file open'd on fd 15
These 5 calls can most likely be reduced to at most one.
I am currently working on a set of refactorings that should address this issue.
CHANGE: http://review.gluster.org/4112 (Reduce the number of stat/fstat system calls made) merged in master by Anand Avati (email@example.com)