Merge tag 'nfs-for-4.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
Pull NFS client updates from Anna Schumaker: "Highlights include: Stable bugfixes: - sunrpc: fix writ espace race causing stalls - NFS: Fix inode corruption in nfs_prime_dcache() - NFSv4: Don't report revoked delegations as valid in nfs_have_delegation() - NFSv4: nfs4_copy_delegation_stateid() must fail if the delegation is invalid - NFSv4: Open state recovery must account for file permission changes - NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic Features: - Add support for tracking multiple layout types with an ordered list - Add support for using multiple backchannel threads on the client - Add support for pNFS file layout session trunking - Delay xprtrdma use of DMA API (for device driver removal) - Add support for xprtrdma remote invalidation - Add support for larger xprtrdma inline thresholds - Use a scatter/gather list for sending xprtrdma RPC calls - Add support for the CB_NOTIFY_LOCK callback - Improve hashing sunrpc auth_creds by using both uid and gid Bugfixes: - Fix xprtrdma use of DMA API - Validate filenames before adding to the dcache - Fix corruption of xdr->nwords in xdr_copy_to_scratch - Fix setting buffer length in xdr_set_next_buffer() - Don't deadlock the state manager on the SEQUENCE status flags - Various delegation and stateid related fixes - Retry operations if an interrupted slot receives EREMOTEIO - Make nfs boot time y2038 safe" * tag 'nfs-for-4.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (100 commits) NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic fs: nfs: Make nfs boot time y2038 safe sunrpc: replace generic auth_cred hash with auth-specific function sunrpc: add RPCSEC_GSS hash_cred() function sunrpc: add auth_unix hash_cred() function sunrpc: add generic_auth hash_cred() function sunrpc: add hash_cred() function to rpc_authops struct Retry operation on EREMOTEIO on an interrupted slot pNFS: Fix atime updates on pNFS clients sunrpc: queue work on system_power_efficient_wq NFSv4.1: Even if the stateid is OK, we may need to recover the open modes NFSv4: If recovery failed for a specific open stateid, then don't retry NFSv4: Fix retry issues with nfs41_test/free_stateid NFSv4: Open state recovery must account for file permission changes NFSv4: Mark the lock and open stateids as invalid after freeing them NFSv4: Don't test open_stateid unless it is set NFSv4: nfs4_do_handle_exception() handle revoke/expiry of a single stateid NFS: Always call nfs_inode_find_state_and_recover() when revoking a delegation NFSv4: Fix a race when updating an open_stateid NFSv4: Fix a race in nfs_inode_reclaim_delegation() ...
This commit is contained in:
@@ -67,6 +67,7 @@ struct nfs4_stateid_struct {
|
||||
NFS4_DELEGATION_STATEID_TYPE,
|
||||
NFS4_LAYOUT_STATEID_TYPE,
|
||||
NFS4_PNFS_DS_STATEID_TYPE,
|
||||
NFS4_REVOKED_STATEID_TYPE,
|
||||
} type;
|
||||
};
|
||||
|
||||
|
@@ -103,6 +103,9 @@ struct nfs_client {
|
||||
#define NFS_SP4_MACH_CRED_WRITE 5 /* WRITE */
|
||||
#define NFS_SP4_MACH_CRED_COMMIT 6 /* COMMIT */
|
||||
#define NFS_SP4_MACH_CRED_PNFS_CLEANUP 7 /* LAYOUTRETURN */
|
||||
#if IS_ENABLED(CONFIG_NFS_V4_1)
|
||||
wait_queue_head_t cl_lock_waitq;
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
#endif /* CONFIG_NFS_V4 */
|
||||
|
||||
/* Our own IP address, as a null-terminated string.
|
||||
|
@@ -124,6 +124,11 @@ struct nfs_fattr {
|
||||
| NFS_ATTR_FATTR_SPACE_USED \
|
||||
| NFS_ATTR_FATTR_V4_SECURITY_LABEL)
|
||||
|
||||
/*
|
||||
* Maximal number of supported layout drivers.
|
||||
*/
|
||||
#define NFS_MAX_LAYOUT_TYPES 8
|
||||
|
||||
/*
|
||||
* Info on the file system
|
||||
*/
|
||||
@@ -139,7 +144,8 @@ struct nfs_fsinfo {
|
||||
__u64 maxfilesize;
|
||||
struct timespec time_delta; /* server time granularity */
|
||||
__u32 lease_time; /* in seconds */
|
||||
__u32 layouttype; /* supported pnfs layout driver */
|
||||
__u32 nlayouttypes; /* number of layouttypes */
|
||||
__u32 layouttype[NFS_MAX_LAYOUT_TYPES]; /* supported pnfs layout driver */
|
||||
__u32 blksize; /* preferred pnfs io block size */
|
||||
__u32 clone_blksize; /* granularity of a CLONE operation */
|
||||
};
|
||||
|
@@ -131,6 +131,7 @@ struct rpc_authops {
|
||||
struct rpc_auth * (*create)(struct rpc_auth_create_args *, struct rpc_clnt *);
|
||||
void (*destroy)(struct rpc_auth *);
|
||||
|
||||
int (*hash_cred)(struct auth_cred *, unsigned int);
|
||||
struct rpc_cred * (*lookup_cred)(struct rpc_auth *, struct auth_cred *, int);
|
||||
struct rpc_cred * (*crcreate)(struct rpc_auth*, struct auth_cred *, int, gfp_t);
|
||||
int (*list_pseudoflavors)(rpc_authflavor_t *, int);
|
||||
|
@@ -125,6 +125,13 @@ struct rpc_create_args {
|
||||
struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */
|
||||
};
|
||||
|
||||
struct rpc_add_xprt_test {
|
||||
int (*add_xprt_test)(struct rpc_clnt *,
|
||||
struct rpc_xprt *,
|
||||
void *calldata);
|
||||
void *data;
|
||||
};
|
||||
|
||||
/* Values for "flags" field */
|
||||
#define RPC_CLNT_CREATE_HARDRTRY (1UL << 0)
|
||||
#define RPC_CLNT_CREATE_AUTOBIND (1UL << 2)
|
||||
@@ -198,6 +205,16 @@ int rpc_clnt_add_xprt(struct rpc_clnt *, struct xprt_create *,
|
||||
void rpc_cap_max_reconnect_timeout(struct rpc_clnt *clnt,
|
||||
unsigned long timeo);
|
||||
|
||||
int rpc_clnt_setup_test_and_add_xprt(struct rpc_clnt *,
|
||||
struct rpc_xprt_switch *,
|
||||
struct rpc_xprt *,
|
||||
void *);
|
||||
|
||||
const char *rpc_proc_name(const struct rpc_task *task);
|
||||
|
||||
void rpc_clnt_xprt_switch_put(struct rpc_clnt *);
|
||||
void rpc_clnt_xprt_switch_add_xprt(struct rpc_clnt *, struct rpc_xprt *);
|
||||
bool rpc_clnt_xprt_switch_has_addr(struct rpc_clnt *clnt,
|
||||
const struct sockaddr *sap);
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_SUNRPC_CLNT_H */
|
||||
|
@@ -46,6 +46,10 @@
|
||||
#define RPCRDMA_VERSION 1
|
||||
#define rpcrdma_version cpu_to_be32(RPCRDMA_VERSION)
|
||||
|
||||
enum {
|
||||
RPCRDMA_V1_DEF_INLINE_SIZE = 1024,
|
||||
};
|
||||
|
||||
struct rpcrdma_segment {
|
||||
__be32 rs_handle; /* Registered memory handle */
|
||||
__be32 rs_length; /* Length of the chunk in bytes */
|
||||
|
@@ -239,8 +239,8 @@ struct rpc_task *rpc_wake_up_first(struct rpc_wait_queue *,
|
||||
void *);
|
||||
void rpc_wake_up_status(struct rpc_wait_queue *, int);
|
||||
void rpc_delay(struct rpc_task *, unsigned long);
|
||||
void * rpc_malloc(struct rpc_task *, size_t);
|
||||
void rpc_free(void *);
|
||||
int rpc_malloc(struct rpc_task *);
|
||||
void rpc_free(struct rpc_task *);
|
||||
int rpciod_up(void);
|
||||
void rpciod_down(void);
|
||||
int __rpc_wait_for_completion_task(struct rpc_task *task, wait_bit_action_f *);
|
||||
|
@@ -67,6 +67,18 @@ struct xdr_buf {
|
||||
len; /* Length of XDR encoded message */
|
||||
};
|
||||
|
||||
static inline void
|
||||
xdr_buf_init(struct xdr_buf *buf, void *start, size_t len)
|
||||
{
|
||||
buf->head[0].iov_base = start;
|
||||
buf->head[0].iov_len = len;
|
||||
buf->tail[0].iov_len = 0;
|
||||
buf->page_len = 0;
|
||||
buf->flags = 0;
|
||||
buf->len = 0;
|
||||
buf->buflen = len;
|
||||
}
|
||||
|
||||
/*
|
||||
* pre-xdr'ed macros.
|
||||
*/
|
||||
|
@@ -83,9 +83,11 @@ struct rpc_rqst {
|
||||
void (*rq_release_snd_buf)(struct rpc_rqst *); /* release rq_enc_pages */
|
||||
struct list_head rq_list;
|
||||
|
||||
__u32 * rq_buffer; /* XDR encode buffer */
|
||||
size_t rq_callsize,
|
||||
rq_rcvsize;
|
||||
void *rq_xprtdata; /* Per-xprt private data */
|
||||
void *rq_buffer; /* Call XDR encode buffer */
|
||||
size_t rq_callsize;
|
||||
void *rq_rbuffer; /* Reply XDR decode buffer */
|
||||
size_t rq_rcvsize;
|
||||
size_t rq_xmit_bytes_sent; /* total bytes sent */
|
||||
size_t rq_reply_bytes_recvd; /* total reply bytes */
|
||||
/* received */
|
||||
@@ -127,8 +129,8 @@ struct rpc_xprt_ops {
|
||||
void (*rpcbind)(struct rpc_task *task);
|
||||
void (*set_port)(struct rpc_xprt *xprt, unsigned short port);
|
||||
void (*connect)(struct rpc_xprt *xprt, struct rpc_task *task);
|
||||
void * (*buf_alloc)(struct rpc_task *task, size_t size);
|
||||
void (*buf_free)(void *buffer);
|
||||
int (*buf_alloc)(struct rpc_task *task);
|
||||
void (*buf_free)(struct rpc_task *task);
|
||||
int (*send_request)(struct rpc_task *task);
|
||||
void (*set_retrans_timeout)(struct rpc_task *task);
|
||||
void (*timer)(struct rpc_xprt *xprt, struct rpc_task *task);
|
||||
|
@@ -66,4 +66,6 @@ extern struct rpc_xprt *xprt_iter_xprt(struct rpc_xprt_iter *xpi);
|
||||
extern struct rpc_xprt *xprt_iter_get_xprt(struct rpc_xprt_iter *xpi);
|
||||
extern struct rpc_xprt *xprt_iter_get_next(struct rpc_xprt_iter *xpi);
|
||||
|
||||
extern bool rpc_xprt_switch_has_addr(struct rpc_xprt_switch *xps,
|
||||
const struct sockaddr *sap);
|
||||
#endif
|
||||
|
@@ -53,8 +53,8 @@
|
||||
#define RPCRDMA_MAX_SLOT_TABLE (256U)
|
||||
|
||||
#define RPCRDMA_MIN_INLINE (1024) /* min inline thresh */
|
||||
#define RPCRDMA_DEF_INLINE (1024) /* default inline thresh */
|
||||
#define RPCRDMA_MAX_INLINE (3068) /* max inline thresh */
|
||||
#define RPCRDMA_DEF_INLINE (4096) /* default inline thresh */
|
||||
#define RPCRDMA_MAX_INLINE (65536) /* max inline thresh */
|
||||
|
||||
/* Memory registration strategies, by number.
|
||||
* This is part of a kernel / user space API. Do not remove. */
|
||||
|
Reference in New Issue
Block a user