OSDN Git Service

NFSv4.2: add client side xattr caching.
authorFrank van der Linden <fllinden@amazon.com>
Tue, 23 Jun 2020 22:39:04 +0000 (22:39 +0000)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 13 Jul 2020 21:52:46 +0000 (17:52 -0400)
commit95ad37f90c338e3fd4abf61cecfe02b6f3e080f0
treecc65ec6496ed30eb9a48cf2eeda6e19be734c65f
parent012a211abd5db098094ce429de5f046368391e68
NFSv4.2: add client side xattr caching.

Implement client side caching for NFSv4.2 extended attributes. The cache
is a per-inode hashtable, with name/value entries. There is one special
entry for the listxattr cache.

NFS inodes have a pointer to a cache structure. The cache structure is
allocated on demand, freed when the cache is invalidated.

Memory shrinkers keep the size in check. Large entries (> PAGE_SIZE)
are collected by a separate shrinker, and freed more aggressively
than others.

Signed-off-by: Frank van der Linden <fllinden@amazon.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/Makefile
fs/nfs/inode.c
fs/nfs/nfs42proc.c
fs/nfs/nfs42xattr.c [new file with mode: 0644]
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4super.c
include/linux/nfs_fs.h
include/uapi/linux/nfs_fs.h