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): RHS 2.0 How reproducible: Every time. 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 Actual results: Multiple stat system calls made. Expected results: One system call made on behalf of the GET operation. Additional info: 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 (avati)