Skip to content

NFSV4 client metrics: GetDeviceInfo/LayoutGet counters wrong (swapped) #725

@johnleslie

Description

@johnleslie

procfs/nfs/parse.go's parseClientV4Stats creates a ClientV4Stats struct in an order inconsistent with the kernel /proc/net/rpc/nfs output.

See: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/refs/tags/v6.12.16/fs/nfs/nfs4xdr.c#7686

parse.go:

                ReclaimComplete:    v[44],
                LayoutGet:          v[45],
                GetDeviceInfo:      v[46],
                LayoutCommit:       v[47],
                LayoutReturn:       v[48],

nfs4xdr.c:

        PROC41(RECLAIM_COMPLETE,enc_reclaim_complete,   dec_reclaim_complete),
        PROC41(GETDEVICEINFO,   enc_getdeviceinfo,      dec_getdeviceinfo),
        PROC41(LAYOUTGET,       enc_layoutget,          dec_layoutget),
        PROC41(LAYOUTCOMMIT,    enc_layoutcommit,       dec_layoutcommit),
        PROC41(LAYOUTRETURN,    enc_layoutreturn,       dec_layoutreturn),

The kernel ordering has been consistent since:

commit b1f69b754ee312ec75f2c7ead0e6851cd9598cc2
Author: Andy Adamson <andros@netapp.com>
Date:   Wed Oct 20 00:18:03 2010 -0400

    NFSv4.1: pnfs: add LAYOUTGET and GETDEVICEINFO infrastructure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions