diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-06-27 15:45:46 (GMT) |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-06-27 15:48:58 (GMT) |
commit | 6c5a0d891543873aefc3aaf846c1e7afe0982ff9 (patch) | |
tree | 67c0fa7f5c11a4288041a60280171f9c53d1f2ea /fs/nfs/pnfs.c | |
parent | da2e8127510525eb4bce0fe34aff06192e042c8f (diff) | |
download | linux-6c5a0d891543873aefc3aaf846c1e7afe0982ff9.tar.xz |
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.c | 3 |
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; |