NFSv4: make cache consistency bitmask dynamic
authorOlga Kornievskaia <kolga@netapp.com>
Mon, 14 Sep 2020 21:05:08 +0000 (17:05 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 24 Sep 2020 14:42:49 +0000 (10:42 -0400)
commit76bd5c016ef49683d626a48748ef1764aaf8ba63
tree4d11a7680707d7123a8498986d820c01c940dba4
parent9f2664512711788e4e1d06f25a925eb7ac681582
NFSv4: make cache consistency bitmask dynamic

Client uses static bitmask for GETATTR on CLOSE/WRITE/DELEGRETURN
and ignores the fact that it might have some attributes marked
invalid in its cache. Compared to v3 where all attributes are
retrieved in postop attributes, v4's cache is frequently out of
sync and leads to standalone GETATTRs being sent to the server.

Instead, in addition to the minimum cache consistency attributes
also check cache_validity and adjust the GETATTR request accordingly.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c
include/linux/nfs_xdr.h