Bug 1404654

Summary: io-stats miss statistics when fh is not newly created
Product: [Community] GlusterFS Reporter: dengjin <cheneydeng88>
Component: io-statsAssignee: bugs <bugs>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: mainlineCC: atumball, bugs, srangana
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: All   
URL: http://www.gluster.org/pipermail/gluster-devel/2016-December/051702.html
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-09 20:30:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description dengjin 2016-12-14 11:16:12 UTC
Description of problem:
The debug/io-stats only do the "ios_inode_ctx_set" in procedure open,create and mkdir.This bug made the statistic will miss if the entry is not created during the lifetime of the current server/nfs process.


Version-Release number of selected component (if applicable):
All.

How reproducible:
Add some logs to the "io_stats_readv_cbk" and do a read request.
Steps to Reproduce:
1. Add log in the "io_stats_readv_cbk" to differentiate if the inode ctx found.
2. create a file A.
3. restart the server/nfs.
4. read file A and watch the log it will show no ctx found and do no statistics.
5. create a file B.
6. read the file B and watch the log it will show ctx found and do statistics.

Actual results:


Expected results:


Additional info:

Comment 1 dengjin 2016-12-14 12:25:14 UTC
I think it's hard to save the "ios_fd" in the fd_t's ctx because not all the procedures pass "fd" to subvolumes,means statistics on a fd granularity needs more code to do.While it is possible to do statistics in the inode in the mechanism now,the loc_t will carry inode ctx through all the xlators.

Comment 2 Amar Tumballi 2019-05-09 20:30:27 UTC
dengjin, it is complex with anon-fd feature of gluster (specially used for gNFS), and hence i would currently mark it as WONTFIX. We will revisit it when we decide to make gNFS fully supported component.