diff options
author | Rick Macklem <rmacklem@FreeBSD.org> | 2017-06-24 20:01:21 +0000 |
---|---|---|
committer | Rick Macklem <rmacklem@FreeBSD.org> | 2017-06-24 20:01:21 +0000 |
commit | a351e99ce61c9174429f919501c8fb705a155db5 (patch) | |
tree | b1e63c987179c9f12ad32163ca71fe3d0bae0bff /sys/fs/nfsclient/nfs_clcomsubs.c | |
parent | a28412b0db08a88906b9c6503a1b42fe5fe27013 (diff) | |
download | src-a351e99ce61c9174429f919501c8fb705a155db5.tar.gz src-a351e99ce61c9174429f919501c8fb705a155db5.zip |
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
Notes
Notes:
svn path=/head/; revision=320322
Diffstat (limited to 'sys/fs/nfsclient/nfs_clcomsubs.c')
-rw-r--r-- | sys/fs/nfsclient/nfs_clcomsubs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c index c16a3402946d..cf3ab8e43b3b 100644 --- a/sys/fs/nfsclient/nfs_clcomsubs.c +++ b/sys/fs/nfsclient/nfs_clcomsubs.c @@ -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 }; /* |