summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-06-27 11:45:46 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-06-27 11:48:58 -0400
commit6c5a0d891543873aefc3aaf846c1e7afe0982ff9 (patch)
tree67c0fa7f5c11a4288041a60280171f9c53d1f2ea /fs/nfs/pnfs.c
parentda2e8127510525eb4bce0fe34aff06192e042c8f (diff)
downloadop-kernel-dev-6c5a0d891543873aefc3aaf846c1e7afe0982ff9.zip
op-kernel-dev-6c5a0d891543873aefc3aaf846c1e7afe0982ff9.tar.gz
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>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 40baceb..0ba9a02 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -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;
OpenPOWER on IntegriCloud