NFSv4.2: LAYOUTSTATS is optional to implement
Make it so, by checking the return value for NFS4ERR_MOTSUPP and caching the information as a server capability. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
@@ -2266,6 +2266,9 @@ pnfs_report_layoutstat(struct inode *inode)
|
||||
if (!pnfs_enabled_sb(server) || !ld->prepare_layoutstats)
|
||||
goto out;
|
||||
|
||||
if (!nfs_server_capable(inode, NFS_CAP_LAYOUTSTATS))
|
||||
goto out;
|
||||
|
||||
if (test_and_set_bit(NFS_INO_LAYOUTSTATS, &nfsi->flags))
|
||||
goto out;
|
||||
|
||||
|
Reference in New Issue
Block a user