summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2014-05-30 18:15:55 +0800
committerTom Haynes <loghyr@primarydata.com>2015-02-03 11:06:33 -0800
commit39280a5ae8443dcc1ab3bb5ebc205aab0855b849 (patch)
tree7b0061d5fc54ebcee094d4d1d52f3040b029cd29 /fs/nfs/pnfs.h
parent064172f3459a914277aa309b2afd3bd5d1c3289a (diff)
downloadop-kernel-dev-39280a5ae8443dcc1ab3bb5ebc205aab0855b849.zip
op-kernel-dev-39280a5ae8443dcc1ab3bb5ebc205aab0855b849.tar.gz
nfs41: move file layout macros to generic pnfs
They can be reused by flexfile layout as well. Also add a code such that if read fails on one DS and there are other DSes available to use, don't resend through MDS but through pNFS so that client can read from other DSes. Reviewed-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Tom Haynes <Thomas.Haynes@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 2ea9e9a..aef89b3 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -77,6 +77,17 @@ enum pnfs_try_status {
#define LAYOUT_NFSV4_1_MODULE_PREFIX "nfs-layouttype4"
+/*
+ * Default data server connection timeout and retrans vaules.
+ * Set by module parameters dataserver_timeo and dataserver_retrans.
+ */
+#define NFS4_DEF_DS_TIMEO 600 /* in tenths of a second */
+#define NFS4_DEF_DS_RETRANS 5
+
+/* error codes for internal use */
+#define NFS4ERR_RESET_TO_MDS 12001
+#define NFS4ERR_RESET_TO_PNFS 12002
+
enum {
NFS_LAYOUT_RO_FAILED = 0, /* get ro layout failed stop trying */
NFS_LAYOUT_RW_FAILED, /* get rw layout failed stop trying */
OpenPOWER on IntegriCloud