+#define NFSVERSBIT(vers) (0x1 << (vers - 1))
+#define NFSVERSBIT_ALL (NFSVERSBIT(2) | NFSVERSBIT(3) | NFSVERSBIT(4))
+
+static int nfs_version = NFSVERSBIT_ALL;
+
+static int version2(void)
+{
+ return nfs_version & NFSVERSBIT(2);
+}
+
+static int version3(void)
+{
+ return nfs_version & NFSVERSBIT(3);
+}
+
+static int version23(void)
+{
+ return nfs_version & (NFSVERSBIT(2) | NFSVERSBIT(3));
+}
+
+static int version_any(void)
+{
+ return nfs_version & NFSVERSBIT_ALL;
+}