summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfsd/export.h16
-rw-r--r--include/linux/nfsd/nfsfh.h13
2 files changed, 27 insertions, 2 deletions
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index d3bd2a796716..97592dbe9a4b 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -52,13 +52,11 @@ struct svc_client {
struct svc_client * cl_next;
char cl_ident[NFSCLNT_IDMAX];
struct list_head cl_export[NFSCLNT_EXPMAX];
- struct list_head cl_expfsid[NFSCLNT_EXPMAX];
struct list_head cl_list;
};
struct svc_export {
struct list_head ex_hash;
- struct list_head ex_fsid_hash;
struct list_head ex_list;
struct svc_client * ex_client;
int ex_flags;
@@ -69,6 +67,20 @@ struct svc_export {
int ex_fsid;
};
+/* an "export key" (expkey) maps a filehandlefragement to an
+ * svc_export for a given client. There can be two per export, one
+ * for type 0 (dev/ino), one for type 1 (fsid)
+ */
+struct svc_expkey {
+ struct list_head ek_hash;
+
+ struct svc_client *ek_client;
+ int ek_fsidtype;
+ u32 ek_fsid[2];
+
+ struct svc_export *ek_export;
+};
+
#define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT))
#define EX_ISSYNC(exp) (!((exp)->ex_flags & NFSEXP_ASYNC))
#define EX_RDONLY(exp) ((exp)->ex_flags & NFSEXP_READONLY)
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index 53f55cc17a50..af0b03c0ce83 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -199,6 +199,19 @@ typedef struct svc_fh {
} svc_fh;
+static inline void mk_fsid_v0(u32 *fsidv, dev_t dev, ino_t ino)
+{
+ fsidv[0] = htonl((MAJOR(dev)<<16) |
+ MINOR(dev));
+ fsidv[1] = ino_t_to_u32(ino);
+}
+
+static inline void mk_fsid_v1(u32 *fsidv, u32 fsid)
+{
+ fsidv[0] = fsid;
+}
+
+
/*
* Shorthand for dprintk()'s
*/