-
Improvement
-
Resolution: Fixed
-
Medium
-
None
-
None
-
3
-
9223372036854775807
The Lustre MDS md_stats file (/proc/fs/lustre/mdt/*/md_stats) tracks open, close, getattr, setattr, mkdir, rmdir, and other operations — but readdir is entirely absent.
mdt_readpage() (lustre/mdt/mdt_handler.c) is the MDS_READPAGE RPC handler but it never calls mdt_counter_incr(), so directory read operations are invisible to all md_stats-derived tooling (procfs, per-NID stats, job_stats, nodemap stats).
Let's dd LPROC_MDT_READDIR to the lproc_mdt_stats enum in lustre/mdt/mdt_internal.h and call mdt_counter_incr(info, LPROC_MDT_READDIR) at the end of mdt_readpage(), following the same pattern used by mdt_reint_open (lustre/mdt/mdt_open.c) for the open counter.