summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4_fs.h
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-03-01 01:34:12 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-11 15:38:41 -0500
commit94de8b27d0dcb2608d56a7e5c2941b87e6da7ce3 (patch)
treebd4b98e229bfbb9d6276e663b2eaca4c70b5bba1 /fs/nfs/nfs4_fs.h
parentd6fb79d433d0a34c36bdf74eaf90857193a6261f (diff)
NFSv4.1: add MDS mount DS only check
The DS only role cannot be used to mount. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4_fs.h')
-rw-r--r--fs/nfs/nfs4_fs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 1be36cf65bfc..d4cfacc40003 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -259,6 +259,13 @@ extern int nfs4_proc_destroy_session(struct nfs4_session *);
extern int nfs4_init_session(struct nfs_server *server);
extern int nfs4_proc_get_lease_time(struct nfs_client *clp,
struct nfs_fsinfo *fsinfo);
+
+static inline bool
+is_ds_only_client(struct nfs_client *clp)
+{
+ return (clp->cl_exchange_flags & EXCHGID4_FLAG_MASK_PNFS) ==
+ EXCHGID4_FLAG_USE_PNFS_DS;
+}
#else /* CONFIG_NFS_v4_1 */
static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *server)
{
@@ -276,6 +283,12 @@ static inline int nfs4_init_session(struct nfs_server *server)
{
return 0;
}
+
+static inline bool
+is_ds_only_client(struct nfs_client *clp)
+{
+ return false;
+}
#endif /* CONFIG_NFS_V4_1 */
extern const struct nfs4_minor_version_ops *nfs_v4_minor_ops[];