Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfs/nfs_commonsubs.c
Show First 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | |||||
* reply. This is used by nfs_reply() to decide whether or not an mbuf | * reply. This is used by nfs_reply() to decide whether or not an mbuf | ||||
* cluster should be allocated. (If a cluster is required by an RPC | * cluster should be allocated. (If a cluster is required by an RPC | ||||
* marked 0 in this array, the code will still work, just not quite as | * marked 0 in this array, the code will still work, just not quite as | ||||
* efficiently.) | * efficiently.) | ||||
*/ | */ | ||||
static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, | static int nfs_bigreply[NFSV42_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, 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, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, | ||||
1, 0, 0, 1 }; | 1, 0, 0, 1, 0 }; | ||||
/* local functions */ | /* local functions */ | ||||
static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); | static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); | ||||
static void nfsv4_wanted(struct nfsv4lock *lp); | static void nfsv4_wanted(struct nfsv4lock *lp); | ||||
static int nfsrv_cmpmixedcase(u_char *cp, u_char *cp2, int len); | static int nfsrv_cmpmixedcase(u_char *cp, u_char *cp2, int len); | ||||
static int nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name); | static int nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name); | ||||
static void nfsrv_removeuser(struct nfsusrgrp *usrp, int isuser); | static void nfsrv_removeuser(struct nfsusrgrp *usrp, int isuser); | ||||
static int nfsrv_getrefstr(struct nfsrv_descript *, u_char **, u_char **, | static int nfsrv_getrefstr(struct nfsrv_descript *, u_char **, u_char **, | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | static struct { | ||||
{ NFSV4OP_ALLOCATE, 2, "Allocate", 8, }, | { NFSV4OP_ALLOCATE, 2, "Allocate", 8, }, | ||||
{ NFSV4OP_SAVEFH, 5, "Copy", 4, }, | { NFSV4OP_SAVEFH, 5, "Copy", 4, }, | ||||
{ NFSV4OP_SEEK, 2, "Seek", 4, }, | { NFSV4OP_SEEK, 2, "Seek", 4, }, | ||||
{ NFSV4OP_SEEK, 1, "SeekDS", 6, }, | { NFSV4OP_SEEK, 1, "SeekDS", 6, }, | ||||
{ NFSV4OP_GETXATTR, 2, "Getxattr", 8, }, | { NFSV4OP_GETXATTR, 2, "Getxattr", 8, }, | ||||
{ NFSV4OP_SETXATTR, 2, "Setxattr", 8, }, | { NFSV4OP_SETXATTR, 2, "Setxattr", 8, }, | ||||
{ NFSV4OP_REMOVEXATTR, 2, "Rmxattr", 7, }, | { NFSV4OP_REMOVEXATTR, 2, "Rmxattr", 7, }, | ||||
{ NFSV4OP_LISTXATTRS, 2, "Listxattr", 9, }, | { NFSV4OP_LISTXATTRS, 2, "Listxattr", 9, }, | ||||
{ NFSV4OP_BINDCONNTOSESS, 1, "BindConSess", 11, }, | |||||
}; | }; | ||||
/* | /* | ||||
* NFS RPCS that have large request message size. | * NFS RPCS that have large request message size. | ||||
*/ | */ | ||||
static int nfs_bigrequest[NFSV42_NPROCS] = { | static int nfs_bigrequest[NFSV42_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, 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, 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, 1, 0, 0 | 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 | ||||
}; | }; | ||||
/* | /* | ||||
* Start building a request. Mostly just put the first file handle in | * Start building a request. Mostly just put the first file handle in | ||||
* place. | * place. | ||||
*/ | */ | ||||
void | void | ||||
nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, | nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, | ||||
▲ Show 20 Lines • Show All 4,604 Lines • Show Last 20 Lines |