summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/devorangefs-req.c
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2016-08-12 18:02:31 +0200
committerMartin Brandenburg <martin@omnibond.com>2016-08-12 21:12:54 +0200
commit482664ddba81b3a5404fd083bb9697dfffc0b6a4 (patch)
treef4dd0268a8cf58fd898f73dd7b26a0a9ef5d2eff /fs/orangefs/devorangefs-req.c
parentorangefs: record userspace version for feature compatbility (diff)
downloadlinux-482664ddba81b3a5404fd083bb9697dfffc0b6a4.tar.xz
linux-482664ddba81b3a5404fd083bb9697dfffc0b6a4.zip
orangefs: add features op
This is a new userspace operation, which will be done if the client-core version is greater than or equal to 2.9.6. This will provide a way to implement optional features and to determine which features are supported by the client-core. If the client-core version is older than 2.9.6, no optional features are supported and the op will not be done. The intent is to allow protocol extensions without relying on the client-core's current behavior of ignoring what it doesn't understand. Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Diffstat (limited to 'fs/orangefs/devorangefs-req.c')
-rw-r--r--fs/orangefs/devorangefs-req.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c
index 7c40e653e526..ec1a5ff1d843 100644
--- a/fs/orangefs/devorangefs-req.c
+++ b/fs/orangefs/devorangefs-req.c
@@ -17,7 +17,7 @@
/* this file implements the /dev/pvfs2-req device node */
-uint32_t userspace_version;
+uint32_t orangefs_userspace_version;
static int open_access_count;
@@ -389,9 +389,9 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
return -EPROTO;
}
- if (!userspace_version) {
- userspace_version = head.version;
- } else if (userspace_version != head.version) {
+ if (!orangefs_userspace_version) {
+ orangefs_userspace_version = head.version;
+ } else if (orangefs_userspace_version != head.version) {
gossip_err("Error: userspace version changes\n");
return -EPROTO;
}
@@ -536,7 +536,7 @@ static int orangefs_devreq_release(struct inode *inode, struct file *file)
gossip_debug(GOSSIP_DEV_DEBUG,
"pvfs2-client-core: device close complete\n");
open_access_count = 0;
- userspace_version = 0;
+ orangefs_userspace_version = 0;
mutex_unlock(&devreq_mutex);
return 0;
}