mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-30 08:19:09 +00:00
Add two new compound RPCs to the NFSv4.1/pNFS client.
When the NFSv4.1 client is doing pNFS, it needs to get an Open and a Layout for every file it will be doing I/O on. The current code does two separate RPCs to get these. This patch adds two new compounds that do the both the Open and LayoutGet in the same RPC, reducing the RPC count. It also factors out the code that sets up and parses the LayoutGet operation into separate functions, so that the code doesn't get duplicated for these new RPCs. This patch is fairly large, but should only affect the NFSv4.1 client when the "pnfs" option is specified. PR: 219550 MFC after: 2 weeks
This commit is contained in:
parent
a28412b0db
commit
a351e99ce6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=320322
@ -175,7 +175,7 @@ static struct nfsrv_lughash *nfsgroupnamehash;
|
||||
*/
|
||||
int nfs_bigreply[NFSV41_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 };
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 };
|
||||
|
||||
/* local functions */
|
||||
static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep);
|
||||
|
@ -357,11 +357,13 @@
|
||||
#define NFSPROC_WRITEDS 51
|
||||
#define NFSPROC_READDS 52
|
||||
#define NFSPROC_COMMITDS 53
|
||||
#define NFSPROC_OPENLAYGET 54
|
||||
#define NFSPROC_CREATELAYGET 55
|
||||
|
||||
/*
|
||||
* Must be defined as one higher than the last NFSv4.1 Proc# above.
|
||||
*/
|
||||
#define NFSV41_NPROCS 54
|
||||
#define NFSV41_NPROCS 56
|
||||
|
||||
#endif /* NFS_V3NPROCS */
|
||||
|
||||
@ -390,7 +392,7 @@ struct nfsstatsv1 {
|
||||
uint64_t readlink_bios;
|
||||
uint64_t biocache_readdirs;
|
||||
uint64_t readdir_bios;
|
||||
uint64_t rpccnt[NFSV41_NPROCS + 15];
|
||||
uint64_t rpccnt[NFSV41_NPROCS + 13];
|
||||
uint64_t rpcretries;
|
||||
uint64_t srvrpccnt[NFSV42_NOPS + NFSV4OP_FAKENOPS];
|
||||
uint64_t srvrpc_errs;
|
||||
|
@ -342,11 +342,13 @@
|
||||
#define NFSPROC_WRITEDS 51
|
||||
#define NFSPROC_READDS 52
|
||||
#define NFSPROC_COMMITDS 53
|
||||
#define NFSPROC_OPENLAYGET 54
|
||||
#define NFSPROC_CREATELAYGET 55
|
||||
|
||||
/*
|
||||
* Must be defined as one higher than the last NFSv4.1 Proc# above.
|
||||
*/
|
||||
#define NFSV41_NPROCS 54
|
||||
#define NFSV41_NPROCS 56
|
||||
|
||||
#endif /* NFS_V3NPROCS */
|
||||
|
||||
|
@ -112,6 +112,8 @@ static struct {
|
||||
{ NFSV4OP_WRITE, 1, "WriteDS", 7, },
|
||||
{ NFSV4OP_READ, 1, "ReadDS", 6, },
|
||||
{ NFSV4OP_COMMIT, 1, "CommitDS", 8, },
|
||||
{ NFSV4OP_OPEN, 3, "OpenLayoutGet", 13, },
|
||||
{ NFSV4OP_OPEN, 8, "CreateLayGet", 12, },
|
||||
};
|
||||
|
||||
/*
|
||||
@ -120,7 +122,7 @@ static struct {
|
||||
static int nfs_bigrequest[NFSV41_NPROCS] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 1, 0, 0
|
||||
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
/*
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user