Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (70 commits) fs/nfs/nfs4proc.c: make nfs4_map_errors() static rpc: add service field to new upcall rpc: add target field to new upcall nfsd: support callbacks with gss flavors rpc: allow gss callbacks to client rpc: pass target name down to rpc level on callbacks nfsd: pass client principal name in rsc downcall rpc: implement new upcall rpc: store pointer to pipe inode in gss upcall message rpc: use count of pipe openers to wait for first open rpc: track number of users of the gss upcall pipe rpc: call release_pipe only on last close rpc: add an rpc_pipe_open method rpc: minor gss_alloc_msg cleanup rpc: factor out warning code from gss_pipe_destroy_msg rpc: remove unnecessary assignment NFS: remove unused status from encode routines NFS: increment number of operations in each encode routine NFS: fix comment placement in nfs4xdr.c NFS: fix tabs in nfs4xdr.c ...
This commit is contained in:
@@ -115,10 +115,20 @@ static inline u64 get_jiffies_64(void)
|
||||
((long)(a) - (long)(b) >= 0))
|
||||
#define time_before_eq(a,b) time_after_eq(b,a)
|
||||
|
||||
/*
|
||||
* Calculate whether a is in the range of [b, c].
|
||||
*/
|
||||
#define time_in_range(a,b,c) \
|
||||
(time_after_eq(a,b) && \
|
||||
time_before_eq(a,c))
|
||||
|
||||
/*
|
||||
* Calculate whether a is in the range of [b, c).
|
||||
*/
|
||||
#define time_in_range_open(a,b,c) \
|
||||
(time_after_eq(a,b) && \
|
||||
time_before(a,c))
|
||||
|
||||
/* Same as above, but does so with platform independent 64bit types.
|
||||
* These must be used when utilizing jiffies_64 (i.e. return value of
|
||||
* get_jiffies_64() */
|
||||
|
@@ -41,6 +41,7 @@ struct nlmclnt_initdata {
|
||||
size_t addrlen;
|
||||
unsigned short protocol;
|
||||
u32 nfs_version;
|
||||
int noresvport;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -49,6 +49,7 @@ struct nlm_host {
|
||||
unsigned short h_proto; /* transport proto */
|
||||
unsigned short h_reclaiming : 1,
|
||||
h_server : 1, /* server side, not client side */
|
||||
h_noresvport : 1,
|
||||
h_inuse : 1;
|
||||
wait_queue_head_t h_gracewait; /* wait while reclaiming */
|
||||
struct rw_semaphore h_rwsem; /* Reboot recovery lock */
|
||||
@@ -220,7 +221,8 @@ struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap,
|
||||
const size_t salen,
|
||||
const unsigned short protocol,
|
||||
const u32 version,
|
||||
const char *hostname);
|
||||
const char *hostname,
|
||||
int noresvport);
|
||||
struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp,
|
||||
const char *hostname,
|
||||
const size_t hostname_len);
|
||||
|
@@ -83,7 +83,7 @@ struct nfs_open_context {
|
||||
struct rpc_cred *cred;
|
||||
struct nfs4_state *state;
|
||||
fl_owner_t lockowner;
|
||||
int mode;
|
||||
fmode_t mode;
|
||||
|
||||
unsigned long flags;
|
||||
#define NFS_CONTEXT_ERROR_WRITE (0)
|
||||
@@ -130,7 +130,10 @@ struct nfs_inode {
|
||||
*
|
||||
* We need to revalidate the cached attrs for this inode if
|
||||
*
|
||||
* jiffies - read_cache_jiffies > attrtimeo
|
||||
* jiffies - read_cache_jiffies >= attrtimeo
|
||||
*
|
||||
* Please note the comparison is greater than or equal
|
||||
* so that zero timeout values can be specified.
|
||||
*/
|
||||
unsigned long read_cache_jiffies;
|
||||
unsigned long attrtimeo;
|
||||
@@ -180,7 +183,7 @@ struct nfs_inode {
|
||||
/* NFSv4 state */
|
||||
struct list_head open_states;
|
||||
struct nfs_delegation *delegation;
|
||||
int delegation_state;
|
||||
fmode_t delegation_state;
|
||||
struct rw_semaphore rwsem;
|
||||
#endif /* CONFIG_NFS_V4*/
|
||||
struct inode vfs_inode;
|
||||
@@ -342,7 +345,7 @@ extern int nfs_setattr(struct dentry *, struct iattr *);
|
||||
extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
|
||||
extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
|
||||
extern void put_nfs_open_context(struct nfs_open_context *ctx);
|
||||
extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode);
|
||||
extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode);
|
||||
extern u64 nfs_compat_user_ino64(u64 fileid);
|
||||
extern void nfs_fattr_init(struct nfs_fattr *fattr);
|
||||
|
||||
@@ -532,12 +535,6 @@ static inline void nfs3_forget_cached_acls(struct inode *inode)
|
||||
}
|
||||
#endif /* CONFIG_NFS_V3_ACL */
|
||||
|
||||
/*
|
||||
* linux/fs/mount_clnt.c
|
||||
*/
|
||||
extern int nfs_mount(struct sockaddr *, size_t, char *, char *,
|
||||
int, int, struct nfs_fh *);
|
||||
|
||||
/*
|
||||
* inline functions
|
||||
*/
|
||||
|
@@ -42,12 +42,6 @@ struct nfs_client {
|
||||
struct rb_root cl_openowner_id;
|
||||
struct rb_root cl_lockowner_id;
|
||||
|
||||
/*
|
||||
* The following rwsem ensures exclusive access to the server
|
||||
* while we recover the state following a lease expiration.
|
||||
*/
|
||||
struct rw_semaphore cl_sem;
|
||||
|
||||
struct list_head cl_delegations;
|
||||
struct rb_root cl_state_owners;
|
||||
spinlock_t cl_lock;
|
||||
|
@@ -45,7 +45,7 @@ struct nfs_mount_data {
|
||||
char context[NFS_MAX_CONTEXT_LEN + 1]; /* 6 */
|
||||
};
|
||||
|
||||
/* bits in the flags field */
|
||||
/* bits in the flags field visible to user space */
|
||||
|
||||
#define NFS_MOUNT_SOFT 0x0001 /* 1 */
|
||||
#define NFS_MOUNT_INTR 0x0002 /* 1 */ /* now unused, but ABI */
|
||||
@@ -68,5 +68,6 @@ struct nfs_mount_data {
|
||||
/* The following are for internal use only */
|
||||
#define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000
|
||||
#define NFS_MOUNT_LOOKUP_CACHE_NONE 0x20000
|
||||
#define NFS_MOUNT_NORESVPORT 0x40000
|
||||
|
||||
#endif
|
||||
|
@@ -120,13 +120,14 @@ struct nfs_openargs {
|
||||
const struct nfs_fh * fh;
|
||||
struct nfs_seqid * seqid;
|
||||
int open_flags;
|
||||
fmode_t fmode;
|
||||
__u64 clientid;
|
||||
__u64 id;
|
||||
union {
|
||||
struct iattr * attrs; /* UNCHECKED, GUARDED */
|
||||
nfs4_verifier verifier; /* EXCLUSIVE */
|
||||
nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
|
||||
int delegation_type; /* CLAIM_PREVIOUS */
|
||||
fmode_t delegation_type; /* CLAIM_PREVIOUS */
|
||||
} u;
|
||||
const struct qstr * name;
|
||||
const struct nfs_server *server; /* Needed for ID mapping */
|
||||
@@ -143,7 +144,7 @@ struct nfs_openres {
|
||||
struct nfs_fattr * dir_attr;
|
||||
struct nfs_seqid * seqid;
|
||||
const struct nfs_server *server;
|
||||
int delegation_type;
|
||||
fmode_t delegation_type;
|
||||
nfs4_stateid delegation;
|
||||
__u32 do_recall;
|
||||
__u64 maxsize;
|
||||
@@ -171,7 +172,7 @@ struct nfs_closeargs {
|
||||
struct nfs_fh * fh;
|
||||
nfs4_stateid * stateid;
|
||||
struct nfs_seqid * seqid;
|
||||
int open_flags;
|
||||
fmode_t fmode;
|
||||
const u32 * bitmask;
|
||||
};
|
||||
|
||||
|
@@ -124,6 +124,8 @@ struct nfs4_client {
|
||||
nfs4_verifier cl_verifier; /* generated by client */
|
||||
time_t cl_time; /* time of last lease renewal */
|
||||
__be32 cl_addr; /* client ipaddress */
|
||||
u32 cl_flavor; /* setclientid pseudoflavor */
|
||||
char *cl_principal; /* setclientid principal name */
|
||||
struct svc_cred cl_cred; /* setclientid principal */
|
||||
clientid_t cl_clientid; /* generated by server */
|
||||
nfs4_verifier cl_confirm; /* generated by server */
|
||||
|
@@ -58,6 +58,7 @@ struct rpc_clnt {
|
||||
struct rpc_timeout cl_timeout_default;
|
||||
struct rpc_program * cl_program;
|
||||
char cl_inline_name[32];
|
||||
char *cl_principal; /* target to authenticate to */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -108,6 +109,7 @@ struct rpc_create_args {
|
||||
u32 version;
|
||||
rpc_authflavor_t authflavor;
|
||||
unsigned long flags;
|
||||
char *client_name;
|
||||
};
|
||||
|
||||
/* Values for "flags" field */
|
||||
|
@@ -15,6 +15,7 @@ struct rpc_pipe_ops {
|
||||
ssize_t (*upcall)(struct file *, struct rpc_pipe_msg *, char __user *, size_t);
|
||||
ssize_t (*downcall)(struct file *, const char __user *, size_t);
|
||||
void (*release_pipe)(struct inode *);
|
||||
int (*open_pipe)(struct inode *);
|
||||
void (*destroy_msg)(struct rpc_pipe_msg *);
|
||||
};
|
||||
|
||||
|
@@ -20,6 +20,7 @@ int gss_svc_init(void);
|
||||
void gss_svc_shutdown(void);
|
||||
int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name);
|
||||
u32 svcauth_gss_flavor(struct auth_domain *dom);
|
||||
char *svc_gss_principal(struct svc_rqst *);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */
|
||||
|
@@ -36,21 +36,6 @@ struct xdr_netobj {
|
||||
*/
|
||||
typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj);
|
||||
|
||||
/*
|
||||
* We're still requiring the BKL in the xdr code until it's been
|
||||
* more carefully audited, at which point this wrapper will become
|
||||
* unnecessary.
|
||||
*/
|
||||
static inline int rpc_call_xdrproc(kxdrproc_t xdrproc, void *rqstp, __be32 *data, void *obj)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lock_kernel();
|
||||
ret = xdrproc(rqstp, data, obj);
|
||||
unlock_kernel();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Basic structure for transmission/reception of a client XDR message.
|
||||
* Features a header (for a linear buffer containing RPC headers
|
||||
|
@@ -76,8 +76,7 @@ struct rpc_rqst {
|
||||
struct list_head rq_list;
|
||||
|
||||
__u32 * rq_buffer; /* XDR encode buffer */
|
||||
size_t rq_bufsize,
|
||||
rq_callsize,
|
||||
size_t rq_callsize,
|
||||
rq_rcvsize;
|
||||
|
||||
struct xdr_buf rq_private_buf; /* The receive buffer
|
||||
|
Reference in New Issue
Block a user