NFS: Configure support for netfs when NFS fscache is configured
authorDave Wysochanski <dwysocha@redhat.com>
Mon, 20 Feb 2023 13:43:05 +0000 (08:43 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 11 Apr 2023 17:00:02 +0000 (13:00 -0400)
commit88a4d7bdeec97890cd543b58dd3588f1f879f51b
treef7970ca20b8998bceefece6ecbb6ccba47f5c74e
parent01c3a40084a42b7a242776d1e9f8e10d4e96c6ef
NFS: Configure support for netfs when NFS fscache is configured

As first steps for support of the netfs library when NFS_FSCACHE is
configured, add NETFS_SUPPORT to Kconfig and add the required netfs_inode
into struct nfs_inode.

Using netfs requires we move the VFS inode structure to be stored
inside struct netfs_inode, along with the fscache_cookie.
Thus, if NFS_FSCACHE is configured, place netfs_inode inside an
anonymous union so the vfs_inode memory is the same and we do
not need to modify other non-fscache areas of NFS.
In addition, inside the NFS fscache code, use the new helpers,
netfs_inode() and netfs_i_cookie() helpers, and remove our own
helper, nfs_i_fscache().

Later patches will convert NFS fscache to fully use netfs.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Tested-by: Daire Byrne <daire@dneg.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/Kconfig
fs/nfs/fscache.c
fs/nfs/fscache.h
include/linux/nfs_fs.h