Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-20484

MDS md_stats lacks a readdir counter

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Medium Medium
    • Lustre 2.18.0
    • 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.

            ablagodarenko Artem Blagodarenko
            ablagodarenko Artem Blagodarenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: