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:
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.
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.