nfsstat: Add an entry to output NFSPROC_APPENDWRITE count

Commit 5218d82c81 added a new NFSv4.1/4.2 procedure called
AppendWrite that uses a Verify to avoid a separate Getattr RPC
for the common case where the client knows the correct file
size for O_APPEND writes.

This patch modifies nfsstat so that it displays a count of
these new RPCs for the "-E -c" option.
This commit is contained in:
Rick Macklem 2022-05-28 16:27:02 -07:00
parent 7cab630ba4
commit d92dc803f6

View File

@ -750,13 +750,16 @@ exp_intpr(int clientOnly, int serverOnly, int nfs41)
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_COMMITDS]);
xo_emit("{T:OpenLayout/%13.13s}{T:CreateLayout/%13.13s}"
"{T:BindConnSess/%13.13s}{T:LookupOpen/%13.13s}\n");
"{T:BindConnSess/%13.13s}{T:LookupOpen/%13.13s}"
"{T:AppendWrite/%13.13s}\n");
xo_emit("{:openlayout/%13ju}{:createlayout/%13ju}"
"{:bindconnsess/%13ju}{:lookupopen/%13ju}\n",
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPENLAYGET],
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATELAYGET],
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_BINDCONNTOSESS],
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOOKUPOPEN]);
"{:bindconnsess/%13ju}{:lookupopen/%13ju}"
"{:appendwrite/%13ju}\n",
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPENLAYGET],
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATELAYGET],
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_BINDCONNTOSESS],
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOOKUPOPEN],
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_APPENDWRITE]);
xo_close_container("nfsv41");