NFSv4.1 enforce rootpath check in fs_location query
authorOlga Kornievskaia <kolga@netapp.com>
Wed, 29 May 2024 19:44:35 +0000 (15:44 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 30 May 2024 20:12:43 +0000 (16:12 -0400)
commit28568c906c1bb5f7560e18082ed7d6295860f1c2
tree39ee5b20a4c7d3dcb0af32dc96857292a6bdfdba
parent296f4ce81d08e73c22408c49f4938a85bd075e5c
NFSv4.1 enforce rootpath check in fs_location query

In commit 4ca9f31a2be66 ("NFSv4.1 test and add 4.1 trunking transport"),
we introduce the ability to query the NFS server for possible trunking
locations of the existing filesystem. However, we never checked the
returned file system path for these alternative locations. According
to the RFC, the server can say that the filesystem currently known
under "fs_root" of fs_location also resides under these server
locations under the following "rootpath" pathname. The client cannot
handle trunking a filesystem that reside under different location
under different paths other than what the main path is. This patch
enforces the check that fs_root path and rootpath path in fs_location
reply is the same.

Fixes: 4ca9f31a2be6 ("NFSv4.1 test and add 4.1 trunking transport")
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4proc.c