diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-06-27 18:45:46 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-06-27 18:48:58 +0300 |
commit | 6c5a0d891543873aefc3aaf846c1e7afe0982ff9 (patch) | |
tree | 67c0fa7f5c11a4288041a60280171f9c53d1f2ea /fs/nfs/nfs42proc.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/nfs42proc.c')
-rw-r--r-- | fs/nfs/nfs42proc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 06c74cd93875..f486b80f927a 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -189,9 +189,15 @@ nfs42_layoutstat_done(struct rpc_task *task, void *calldata) if (!nfs4_sequence_done(task, &data->res.seq_res)) return; - /* well, we don't care about errors at all! */ - if (task->tk_status) + switch (task->tk_status) { + case 0: + break; + case -ENOTSUPP: + case -EOPNOTSUPP: + NFS_SERVER(data->inode)->caps &= ~NFS_CAP_LAYOUTSTATS; + default: dprintk("%s server returns %d\n", __func__, task->tk_status); + } } static void |