Merge tag 'nfs-for-4.4-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust:
"Highlights include:
New features:
- RDMA client backchannel from Chuck
- Support for NFSv4.2 file CLONE using the btrfs ioctl
Bugfixes + cleanups:
- Move socket data receive out of the bottom halves and into a
workqueue
- Refactor NFSv4 error handling so synchronous and asynchronous RPC
handles errors identically.
- Fix a panic when blocks or object layouts reads return a bad data
length
- Fix nfsroot so it can handle a 1024 byte long path.
- Fix bad usage of page offset in bl_read_pagelist
- Various NFSv4 callback cleanups+fixes
- Fix GETATTR bitmap verification
- Support hexadecimal number for sunrpc debug sysctl files"
* tag 'nfs-for-4.4-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (53 commits)
Sunrpc: Supports hexadecimal number for sysctl files of sunrpc debug
nfs: Fix GETATTR bitmap verification
nfs: Remove unused xdr page offsets in getacl/setacl arguments
fs/nfs: remove unnecessary new_valid_dev check
SUNRPC: fix variable type
NFS: Enable client side NFSv4.1 backchannel to use other transports
pNFS/flexfiles: Add support for FF_FLAGS_NO_IO_THRU_MDS
pNFS/flexfiles: When mirrored, retry failed reads by switching mirrors
SUNRPC: Remove the TCP-only restriction in bc_svc_process()
svcrdma: Add backward direction service for RPC/RDMA transport
xprtrdma: Handle incoming backward direction RPC calls
xprtrdma: Add support for sending backward direction RPC replies
xprtrdma: Pre-allocate Work Requests for backchannel
xprtrdma: Pre-allocate backward rpc_rqst and send/receive buffers
SUNRPC: Abstract backchannel operations
xprtrdma: Saving IRQs no longer needed for rb_lock
xprtrdma: Remove reply tasklet
xprtrdma: Use workqueue to process RPC/RDMA replies
xprtrdma: Replace send and receive arrays
xprtrdma: Refactor reply handler error handling
...
This commit is contained in:
@@ -130,6 +130,7 @@ enum nfs_opnum4 {
|
||||
OP_READ_PLUS = 68,
|
||||
OP_SEEK = 69,
|
||||
OP_WRITE_SAME = 70,
|
||||
OP_CLONE = 71,
|
||||
|
||||
OP_ILLEGAL = 10044,
|
||||
};
|
||||
@@ -421,6 +422,7 @@ enum lock_type4 {
|
||||
#define FATTR4_WORD2_LAYOUT_TYPES (1UL << 0)
|
||||
#define FATTR4_WORD2_LAYOUT_BLKSIZE (1UL << 1)
|
||||
#define FATTR4_WORD2_MDSTHRESHOLD (1UL << 4)
|
||||
#define FATTR4_WORD2_CLONE_BLKSIZE (1UL << 13)
|
||||
#define FATTR4_WORD2_SECURITY_LABEL (1UL << 16)
|
||||
|
||||
/* MDS threshold bitmap bits */
|
||||
@@ -501,6 +503,7 @@ enum {
|
||||
NFSPROC4_CLNT_ALLOCATE,
|
||||
NFSPROC4_CLNT_DEALLOCATE,
|
||||
NFSPROC4_CLNT_LAYOUTSTATS,
|
||||
NFSPROC4_CLNT_CLONE,
|
||||
};
|
||||
|
||||
/* nfs41 types */
|
||||
|
||||
@@ -147,6 +147,7 @@ struct nfs_server {
|
||||
unsigned int acdirmax;
|
||||
unsigned int namelen;
|
||||
unsigned int options; /* extra options enabled by mount */
|
||||
unsigned int clone_blksize; /* granularity of a CLONE operation */
|
||||
#define NFS_OPTION_FSCACHE 0x00000001 /* - local caching enabled */
|
||||
#define NFS_OPTION_MIGRATION 0x00000002 /* - NFSv4 migration enabled */
|
||||
|
||||
@@ -243,5 +244,6 @@ struct nfs_server {
|
||||
#define NFS_CAP_ALLOCATE (1U << 20)
|
||||
#define NFS_CAP_DEALLOCATE (1U << 21)
|
||||
#define NFS_CAP_LAYOUTSTATS (1U << 22)
|
||||
#define NFS_CAP_CLONE (1U << 23)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -141,6 +141,7 @@ struct nfs_fsinfo {
|
||||
__u32 lease_time; /* in seconds */
|
||||
__u32 layouttype; /* supported pnfs layout driver */
|
||||
__u32 blksize; /* preferred pnfs io block size */
|
||||
__u32 clone_blksize; /* granularity of a CLONE operation */
|
||||
};
|
||||
|
||||
struct nfs_fsstat {
|
||||
@@ -359,6 +360,25 @@ struct nfs42_layoutstat_data {
|
||||
struct nfs42_layoutstat_res res;
|
||||
};
|
||||
|
||||
struct nfs42_clone_args {
|
||||
struct nfs4_sequence_args seq_args;
|
||||
struct nfs_fh *src_fh;
|
||||
struct nfs_fh *dst_fh;
|
||||
nfs4_stateid src_stateid;
|
||||
nfs4_stateid dst_stateid;
|
||||
__u64 src_offset;
|
||||
__u64 dst_offset;
|
||||
__u64 count;
|
||||
const u32 *dst_bitmask;
|
||||
};
|
||||
|
||||
struct nfs42_clone_res {
|
||||
struct nfs4_sequence_res seq_res;
|
||||
unsigned int rpc_status;
|
||||
struct nfs_fattr *dst_fattr;
|
||||
const struct nfs_server *server;
|
||||
};
|
||||
|
||||
struct stateowner_id {
|
||||
__u64 create_time;
|
||||
__u32 uniquifier;
|
||||
@@ -528,7 +548,7 @@ struct nfs4_delegreturnargs {
|
||||
struct nfs4_delegreturnres {
|
||||
struct nfs4_sequence_res seq_res;
|
||||
struct nfs_fattr * fattr;
|
||||
const struct nfs_server *server;
|
||||
struct nfs_server *server;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -601,7 +621,7 @@ struct nfs_removeargs {
|
||||
|
||||
struct nfs_removeres {
|
||||
struct nfs4_sequence_res seq_res;
|
||||
const struct nfs_server *server;
|
||||
struct nfs_server *server;
|
||||
struct nfs_fattr *dir_attr;
|
||||
struct nfs4_change_info cinfo;
|
||||
};
|
||||
@@ -619,7 +639,7 @@ struct nfs_renameargs {
|
||||
|
||||
struct nfs_renameres {
|
||||
struct nfs4_sequence_res seq_res;
|
||||
const struct nfs_server *server;
|
||||
struct nfs_server *server;
|
||||
struct nfs4_change_info old_cinfo;
|
||||
struct nfs_fattr *old_fattr;
|
||||
struct nfs4_change_info new_cinfo;
|
||||
@@ -685,7 +705,6 @@ struct nfs_setaclargs {
|
||||
struct nfs4_sequence_args seq_args;
|
||||
struct nfs_fh * fh;
|
||||
size_t acl_len;
|
||||
unsigned int acl_pgbase;
|
||||
struct page ** acl_pages;
|
||||
};
|
||||
|
||||
@@ -697,7 +716,6 @@ struct nfs_getaclargs {
|
||||
struct nfs4_sequence_args seq_args;
|
||||
struct nfs_fh * fh;
|
||||
size_t acl_len;
|
||||
unsigned int acl_pgbase;
|
||||
struct page ** acl_pages;
|
||||
};
|
||||
|
||||
|
||||
@@ -38,6 +38,11 @@ void xprt_free_bc_request(struct rpc_rqst *req);
|
||||
int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs);
|
||||
void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs);
|
||||
|
||||
/* Socket backchannel transport methods */
|
||||
int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs);
|
||||
void xprt_destroy_bc(struct rpc_xprt *xprt, unsigned int max_reqs);
|
||||
void xprt_free_bc_rqst(struct rpc_rqst *req);
|
||||
|
||||
/*
|
||||
* Determine if a shared backchannel is in use
|
||||
*/
|
||||
|
||||
@@ -226,9 +226,13 @@ extern void svc_rdma_put_frmr(struct svcxprt_rdma *,
|
||||
struct svc_rdma_fastreg_mr *);
|
||||
extern void svc_sq_reap(struct svcxprt_rdma *);
|
||||
extern void svc_rq_reap(struct svcxprt_rdma *);
|
||||
extern struct svc_xprt_class svc_rdma_class;
|
||||
extern void svc_rdma_prep_reply_hdr(struct svc_rqst *);
|
||||
|
||||
extern struct svc_xprt_class svc_rdma_class;
|
||||
#ifdef CONFIG_SUNRPC_BACKCHANNEL
|
||||
extern struct svc_xprt_class svc_rdma_bc_class;
|
||||
#endif
|
||||
|
||||
/* svc_rdma.c */
|
||||
extern int svc_rdma_init(void);
|
||||
extern void svc_rdma_cleanup(void);
|
||||
|
||||
@@ -54,6 +54,8 @@ enum rpc_display_format_t {
|
||||
struct rpc_task;
|
||||
struct rpc_xprt;
|
||||
struct seq_file;
|
||||
struct svc_serv;
|
||||
struct net;
|
||||
|
||||
/*
|
||||
* This describes a complete RPC request
|
||||
@@ -136,6 +138,12 @@ struct rpc_xprt_ops {
|
||||
int (*enable_swap)(struct rpc_xprt *xprt);
|
||||
void (*disable_swap)(struct rpc_xprt *xprt);
|
||||
void (*inject_disconnect)(struct rpc_xprt *xprt);
|
||||
int (*bc_setup)(struct rpc_xprt *xprt,
|
||||
unsigned int min_reqs);
|
||||
int (*bc_up)(struct svc_serv *serv, struct net *net);
|
||||
void (*bc_free_rqst)(struct rpc_rqst *rqst);
|
||||
void (*bc_destroy)(struct rpc_xprt *xprt,
|
||||
unsigned int max_reqs);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -153,6 +161,7 @@ enum xprt_transports {
|
||||
XPRT_TRANSPORT_TCP = IPPROTO_TCP,
|
||||
XPRT_TRANSPORT_BC_TCP = IPPROTO_TCP | XPRT_TRANSPORT_BC,
|
||||
XPRT_TRANSPORT_RDMA = 256,
|
||||
XPRT_TRANSPORT_BC_RDMA = XPRT_TRANSPORT_RDMA | XPRT_TRANSPORT_BC,
|
||||
XPRT_TRANSPORT_LOCAL = 257,
|
||||
};
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ struct sock_xprt {
|
||||
*/
|
||||
unsigned long sock_state;
|
||||
struct delayed_work connect_worker;
|
||||
struct work_struct recv_worker;
|
||||
struct mutex recv_mutex;
|
||||
struct sockaddr_storage srcaddr;
|
||||
unsigned short srcport;
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef _UAPI_LINUX_NFS_H
|
||||
#define _UAPI_LINUX_NFS_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define NFS_PROGRAM 100003
|
||||
#define NFS_PORT 2049
|
||||
#define NFS_MAXDATA 8192
|
||||
@@ -31,6 +33,17 @@
|
||||
|
||||
#define NFS_PIPE_DIRNAME "nfs"
|
||||
|
||||
/* NFS ioctls */
|
||||
/* Let's follow btrfs lead on CLONE to avoid messing userspace */
|
||||
#define NFS_IOC_CLONE _IOW(0x94, 9, int)
|
||||
#define NFS_IOC_CLONE_RANGE _IOW(0x94, 13, int)
|
||||
|
||||
struct nfs_ioctl_clone_range_args {
|
||||
__s64 src_fd;
|
||||
__u64 src_off, count;
|
||||
__u64 dst_off;
|
||||
};
|
||||
|
||||
/*
|
||||
* NFS stats. The good thing with these values is that NFSv3 errors are
|
||||
* a superset of NFSv2 errors (with the exception of NFSERR_WFLUSH which
|
||||
|
||||
Reference in New Issue
Block a user