forked from IBM/DPFS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started work on implementing NFS 4.1 with session trunking (IBM#2)
Signed-off-by: Peter-Jan Gootzen <[email protected]>
- Loading branch information
1 parent
780c45f
commit 64d7e82
Showing
5 changed files
with
318 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
*.svg filter=lfs diff=lfs merge=lfs -text | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,15 @@ | |
# Copyright 2022- IBM Inc. All rights reserved | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
# | ||
# GPL-2.0 WITH Linux-syscall-note | ||
# from https://elixir.bootlin.com/linux/v6.0.12/source/include/uapi/linux/nfs4.h | ||
# | ||
*/ | ||
|
||
#ifndef NFS_V4_H | ||
#define NFS_V4_H | ||
|
||
#include <stdbool.h> | ||
#include <linux/fuse.h> | ||
#include <nfsc/libnfs-raw-nfs4.h> | ||
|
||
|
@@ -16,6 +20,38 @@ | |
// Empirically verified with Linux kernel 5.11 | ||
#define NFS_ROOT_FILEID 2 | ||
|
||
// 1MB is max read/write size in Linux, + some overhead | ||
#define NFS4_MAXRESPONSESIZE (1 << 20) | ||
#define NFS4_MAXREQUESTSIZE (1 << 20) | ||
|
||
#define NFS4_MAX_OUTSTANDING_REQUESTS 64 | ||
|
||
/* | ||
* linux/include/linux/nfs4.h | ||
* | ||
* NFSv4 protocol definitions. | ||
* | ||
* Copyright (c) 2002 The Regents of the University of Michigan. | ||
* All rights reserved. | ||
* | ||
* Kendrick Smith <[email protected]> | ||
* Andy Adamson <[email protected]> | ||
*/ | ||
|
||
/* An NFS4 sessions server must support at least NFS4_MAX_OPS operations. | ||
* If a compound requires more operations, adjust NFS4_MAX_OPS accordingly. | ||
*/ | ||
#define NFS4_MAX_OPS 8 | ||
|
||
/* Our NFS4 client back channel server only wants the cb_sequene and the | ||
* actual operation per compound | ||
*/ | ||
#define NFS4_MAX_BACK_CHANNEL_OPS 2 | ||
|
||
/* | ||
* End of Linux header | ||
*/ | ||
|
||
// No malloc needed | ||
struct vnfs_fh4 { | ||
u_int len; | ||
|
@@ -26,6 +62,11 @@ typedef struct vnfs_fh4 vnfs_fh4; | |
int nfs4_clone_fh(vnfs_fh4 *dst, nfs_fh4 *src); | ||
int nfs4_find_op(COMPOUND4res *res, int op); | ||
int nfs4_fill_create_attrs(struct fuse_in_header *in_hdr, uint32_t flags, fattr4 *attr); | ||
bool nfs4_check_session_trunking_allowed(EXCHANGE_ID4resok *l, EXCHANGE_ID4resok *r); | ||
// Supply the clientid received from EXCHANGE_ID | ||
int nfs4_op_createsession(nfs_argop4 *op, clientid4 clientid); | ||
int nfs4_op_bindconntosession(nfs_argop4 *op, sessionid4 *sessionid, channel_dir_from_client4 channel, bool rdma); | ||
int nfs4_op_exchangeid(nfs_argop4 *op, verifier4 verifier, const char *client_name); | ||
int nfs4_op_setclientid(nfs_argop4 *op, verifier4 verifier, const char *client_name); | ||
int nfs4_op_setclientid_confirm(struct nfs_argop4 *op, uint64_t clientid, verifier4 verifier); | ||
int nfs4_op_getattr(nfs_argop4 *op, uint32_t *attributes, int count); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.