Blame view
fs/nfsd/export.h
2.96 KB
1da177e4c Linux-2.6.12-rc2 |
1 |
/* |
1da177e4c Linux-2.6.12-rc2 |
2 3 |
* Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de> */ |
1da177e4c Linux-2.6.12-rc2 |
4 5 |
#ifndef NFSD_EXPORT_H #define NFSD_EXPORT_H |
9c69de4c9 nfsd: remove <lin... |
6 |
#include <linux/sunrpc/cache.h> |
616d1ca5d UAPI: (Scripted) ... |
7 |
#include <uapi/linux/nfsd/export.h> |
4bc660377 nfsd: include lin... |
8 |
#include <linux/nfs4.h> |
1da177e4c Linux-2.6.12-rc2 |
9 |
|
9c69de4c9 nfsd: remove <lin... |
10 11 12 |
struct knfsd_fh; struct svc_fh; struct svc_rqst; |
933469190 [PATCH] knfsd: nf... |
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
/* * FS Locations */ #define MAX_FS_LOCATIONS 128 struct nfsd4_fs_location { char *hosts; /* colon separated list of hosts */ char *path; /* slash separated list of path components */ }; struct nfsd4_fs_locations { uint32_t locations_count; struct nfsd4_fs_location *locations; /* If we're not actually serving this data ourselves (only providing a * list of replicas that do serve it) then we set "migrated": */ int migrated; }; |
e677bfe4d knfsd: nfsd4: par... |
31 32 |
/* * We keep an array of pseudoflavors with the export, in order from most |
25985edce Fix common misspe... |
33 |
* to least preferred. For the foreseeable future, we don't expect more |
e677bfe4d knfsd: nfsd4: par... |
34 35 36 37 |
* than the eight pseudoflavors null, unix, krb5, krb5i, krb5p, skpm3, * spkm3i, and spkm3p (and using all 8 at once should be rare). */ #define MAX_SECINFO_LIST 8 |
94eb36892 NFSD: Adds macro ... |
38 |
#define EX_UUID_LEN 16 |
e677bfe4d knfsd: nfsd4: par... |
39 40 41 42 43 |
struct exp_flavor_info { u32 pseudoflavor; u32 flags; }; |
1da177e4c Linux-2.6.12-rc2 |
44 45 46 47 |
struct svc_export { struct cache_head h; struct auth_domain * ex_client; int ex_flags; |
547754916 Use struct path i... |
48 |
struct path ex_path; |
4c1e1b34d nfsd: Store ex_an... |
49 50 |
kuid_t ex_anon_uid; kgid_t ex_anon_gid; |
1da177e4c Linux-2.6.12-rc2 |
51 |
int ex_fsid; |
af6a4e280 [PATCH] knfsd: ad... |
52 |
unsigned char * ex_uuid; /* 16 byte fsid */ |
933469190 [PATCH] knfsd: nf... |
53 |
struct nfsd4_fs_locations ex_fslocs; |
1f53146da NFSD: Using type ... |
54 |
uint32_t ex_nflavors; |
e677bfe4d knfsd: nfsd4: par... |
55 |
struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST]; |
8a4c39268 nfsd: allow nfsd ... |
56 |
u32 ex_layout_types; |
9cf514ccf nfsd: implement p... |
57 |
struct nfsd4_deviceid_map *ex_devid_map; |
db3a35326 nfsd: add link to... |
58 |
struct cache_detail *cd; |
1da177e4c Linux-2.6.12-rc2 |
59 60 61 |
}; /* an "export key" (expkey) maps a filehandlefragement to an |
af6a4e280 [PATCH] knfsd: ad... |
62 63 |
* svc_export for a given client. There can be several per export, * for the different fsid types. |
1da177e4c Linux-2.6.12-rc2 |
64 65 66 67 68 69 |
*/ struct svc_expkey { struct cache_head h; struct auth_domain * ek_client; int ek_fsidtype; |
af6a4e280 [PATCH] knfsd: ad... |
70 |
u32 ek_fsid[6]; |
1da177e4c Linux-2.6.12-rc2 |
71 |
|
e83aece3a Use struct path i... |
72 |
struct path ek_path; |
1da177e4c Linux-2.6.12-rc2 |
73 |
}; |
1da177e4c Linux-2.6.12-rc2 |
74 |
#define EX_ISSYNC(exp) (!((exp)->ex_flags & NFSEXP_ASYNC)) |
1da177e4c Linux-2.6.12-rc2 |
75 76 |
#define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE) #define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES) |
c7d51402d knfsd: clean up E... |
77 |
int nfsexp_flags(struct svc_rqst *rqstp, struct svc_export *exp); |
32c1eb0cd knfsd: nfsd4: ret... |
78 |
__be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp); |
1da177e4c Linux-2.6.12-rc2 |
79 80 81 82 |
/* * Function declarations */ |
b89109bef nfsd: pass networ... |
83 84 |
int nfsd_export_init(struct net *); void nfsd_export_shutdown(struct net *); |
b3853e0ea nfsd: make export... |
85 |
void nfsd_export_flush(struct net *); |
0989a7889 knfsd: nfsd: prov... |
86 |
struct svc_export * rqst_exp_get_by_name(struct svc_rqst *, |
91c9fa8f7 switch rqst_exp_g... |
87 |
struct path *); |
0989a7889 knfsd: nfsd: prov... |
88 |
struct svc_export * rqst_exp_parent(struct svc_rqst *, |
e64c390ca switch rqst_exp_p... |
89 |
struct path *); |
ed748aacb NFSD: Cleanup for... |
90 |
struct svc_export * rqst_find_fsidzero_export(struct svc_rqst *); |
b3853e0ea nfsd: make export... |
91 |
int exp_rootfh(struct net *, struct auth_domain *, |
1da177e4c Linux-2.6.12-rc2 |
92 |
char *path, struct knfsd_fh *, int maxsize); |
df547efb0 knfsd: nfsd4: sim... |
93 |
__be32 exp_pseudoroot(struct svc_rqst *, struct svc_fh *); |
63f103111 [PATCH] nfsd: nfs... |
94 |
__be32 nfserrno(int errno); |
1da177e4c Linux-2.6.12-rc2 |
95 |
|
1da177e4c Linux-2.6.12-rc2 |
96 97 |
static inline void exp_put(struct svc_export *exp) { |
71234978e nfsd: use cache d... |
98 |
cache_put(&exp->h, exp->cd); |
1da177e4c Linux-2.6.12-rc2 |
99 |
} |
bf18f163e NFSD: Using exp_g... |
100 |
static inline struct svc_export *exp_get(struct svc_export *exp) |
1da177e4c Linux-2.6.12-rc2 |
101 102 |
{ cache_get(&exp->h); |
bf18f163e NFSD: Using exp_g... |
103 |
return exp; |
1da177e4c Linux-2.6.12-rc2 |
104 |
} |
0989a7889 knfsd: nfsd: prov... |
105 |
struct svc_export * rqst_exp_find(struct svc_rqst *, int, u32 *); |
1da177e4c Linux-2.6.12-rc2 |
106 |
|
1da177e4c Linux-2.6.12-rc2 |
107 |
#endif /* NFSD_EXPORT_H */ |