Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
nfs4xdr.c File Reference
#include <linux/slab.h>
#include <linux/namei.h>
#include <linux/statfs.h>
#include <linux/utsname.h>
#include <linux/pagemap.h>
#include <linux/sunrpc/svcauth_gss.h>
#include "idmap.h"
#include "acl.h"
#include "xdr4.h"
#include "vfs.h"
#include "state.h"
#include "cache.h"

Go to the source code of this file.

Data Structures

struct  nfsd4_minorversion_ops
 

Macros

#define NFSDDBG_FACILITY   NFSDDBG_XDR
 
#define NFS4_REFERRAL_FSID_MAJOR   0x8000000ULL
 
#define NFS4_REFERRAL_FSID_MINOR   0x8000000ULL
 
#define DECODE_HEAD
 
#define DECODE_TAIL
 
#define READ32(x)   (x) = ntohl(*p++)
 
#define READ64(x)
 
#define READTIME(x)
 
#define READMEM(x, nbytes)
 
#define SAVEMEM(x, nbytes)
 
#define COPYMEM(x, nbytes)
 
#define READ_BUF(nbytes)
 
#define WRITE32(n)   *p++ = htonl(n)
 
#define WRITE64(n)
 
#define WRITEMEM(ptr, nbytes)
 
#define RESERVE_SPACE(nbytes)
 
#define ADJUST_ARGS()   resp->p = p
 
#define ENCODE_SEQID_OP_HEAD
 
#define WORD0_ABSENT_FS_ATTRS
 
#define WORD1_ABSENT_FS_ATTRS   FATTR4_WORD1_MOUNTED_ON_FILEID
 

Typedefs

typedef __be32(* nfsd4_dec )(struct nfsd4_compoundargs *argp, void *)
 
typedef __be32(* nfsd4_enc )(struct nfsd4_compoundres *, __be32, void *)
 

Functions

__be32 nfsd4_encode_fattr (struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, __be32 *buffer, int *countp, u32 *bmval, struct svc_rqst *rqstp, int ignore_crossmnt)
 
__be32 nfsd4_check_resp_size (struct nfsd4_compoundres *resp, u32 pad)
 
void nfsd4_encode_operation (struct nfsd4_compoundres *resp, struct nfsd4_op *op)
 
void nfsd4_encode_replay (struct nfsd4_compoundres *resp, struct nfsd4_op *op)
 
int nfs4svc_encode_voidres (struct svc_rqst *rqstp, __be32 *p, void *dummy)
 
int nfsd4_release_compoundargs (void *rq, __be32 *p, void *resp)
 
int nfs4svc_decode_compoundargs (struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundargs *args)
 
int nfs4svc_encode_compoundres (struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundres *resp)
 

Macro Definition Documentation

#define ADJUST_ARGS ( )    resp->p = p

Definition at line 1714 of file nfs4xdr.c.

#define COPYMEM (   x,
  nbytes 
)
Value:
do { \
memcpy((x), p, nbytes); \
p += XDR_QUADLEN(nbytes); \
} while (0)

Definition at line 119 of file nfs4xdr.c.

#define DECODE_HEAD
Value:

Definition at line 82 of file nfs4xdr.c.

#define DECODE_TAIL
Value:
status = 0; \
out: \
return status; \
xdr_error: \
dprintk("NFSD: xdr error (%s:%d)\n", \
__FILE__, __LINE__); \
goto out

Definition at line 85 of file nfs4xdr.c.

#define ENCODE_SEQID_OP_HEAD
Value:
__be32 *save; \
\
save = resp->p;

Definition at line 1719 of file nfs4xdr.c.

#define NFS4_REFERRAL_FSID_MAJOR   0x8000000ULL

Definition at line 64 of file nfs4xdr.c.

#define NFS4_REFERRAL_FSID_MINOR   0x8000000ULL

Definition at line 65 of file nfs4xdr.c.

#define NFSDDBG_FACILITY   NFSDDBG_XDR

Definition at line 57 of file nfs4xdr.c.

#define READ32 (   x)    (x) = ntohl(*p++)

Definition at line 95 of file nfs4xdr.c.

#define READ64 (   x)
Value:
do { \
(x) = (u64)ntohl(*p++) << 32; \
(x) |= ntohl(*p++); \
} while (0)

Definition at line 96 of file nfs4xdr.c.

#define READ_BUF (   nbytes)
Value:
do { \
if (nbytes <= (u32)((char *)argp->end - (char *)argp->p)) { \
p = argp->p; \
argp->p += XDR_QUADLEN(nbytes); \
} else if (!(p = read_buf(argp, nbytes))) { \
dprintk("NFSD: xdr error (%s:%d)\n", \
__FILE__, __LINE__); \
goto xdr_error; \
} \
} while (0)

Definition at line 125 of file nfs4xdr.c.

#define READMEM (   x,
  nbytes 
)
Value:
do { \
x = (char *)p; \
p += XDR_QUADLEN(nbytes); \
} while (0)

Definition at line 105 of file nfs4xdr.c.

#define READTIME (   x)
Value:
do { \
p++; \
(x) = ntohl(*p++); \
p++; \
} while (0)

Definition at line 100 of file nfs4xdr.c.

#define RESERVE_SPACE (   nbytes)
Value:
do { \
p = resp->p; \
BUG_ON(p + XDR_QUADLEN(nbytes) > resp->end); \
} while (0)

Definition at line 1710 of file nfs4xdr.c.

#define SAVEMEM (   x,
  nbytes 
)
Value:
do { \
if (!(x = (p==argp->tmp || p == argp->tmpp) ? \
savemem(argp, p, nbytes) : \
(char *)p)) { \
dprintk("NFSD: xdr error (%s:%d)\n", \
__FILE__, __LINE__); \
goto xdr_error; \
} \
p += XDR_QUADLEN(nbytes); \
} while (0)

Definition at line 109 of file nfs4xdr.c.

#define WORD0_ABSENT_FS_ATTRS
Value:
FATTR4_WORD0_RDATTR_ERROR)

Definition at line 1997 of file nfs4xdr.c.

#define WORD1_ABSENT_FS_ATTRS   FATTR4_WORD1_MOUNTED_ON_FILEID

Definition at line 1999 of file nfs4xdr.c.

#define WRITE32 (   n)    *p++ = htonl(n)

Definition at line 1664 of file nfs4xdr.c.

#define WRITE64 (   n)
Value:
do { \
*p++ = htonl((u32)((n) >> 32)); \
*p++ = htonl((u32)(n)); \
} while (0)

Definition at line 1665 of file nfs4xdr.c.

#define WRITEMEM (   ptr,
  nbytes 
)
Value:
do { if (nbytes > 0) { \
*(p + XDR_QUADLEN(nbytes) -1) = 0; \
memcpy(p, ptr, nbytes); \
p += XDR_QUADLEN(nbytes); \
}} while (0)

Definition at line 1669 of file nfs4xdr.c.

Typedef Documentation

typedef __be32(* nfsd4_dec)(struct nfsd4_compoundargs *argp, void *)

Definition at line 1449 of file nfs4xdr.c.

typedef __be32(* nfsd4_enc)(struct nfsd4_compoundres *, __be32, void *)

Definition at line 3452 of file nfs4xdr.c.

Function Documentation

int nfs4svc_decode_compoundargs ( struct svc_rqst rqstp,
__be32 p,
struct nfsd4_compoundargs args 
)

Definition at line 3647 of file nfs4xdr.c.

int nfs4svc_encode_compoundres ( struct svc_rqst rqstp,
__be32 p,
struct nfsd4_compoundres resp 
)

Definition at line 3662 of file nfs4xdr.c.

int nfs4svc_encode_voidres ( struct svc_rqst rqstp,
__be32 p,
void dummy 
)

Definition at line 3621 of file nfs4xdr.c.

__be32 nfsd4_check_resp_size ( struct nfsd4_compoundres resp,
u32  pad 
)

Definition at line 3532 of file nfs4xdr.c.

__be32 nfsd4_encode_fattr ( struct svc_fh fhp,
struct svc_export exp,
struct dentry dentry,
__be32 buffer,
int countp,
u32 bmval,
struct svc_rqst rqstp,
int  ignore_crossmnt 
)

Definition at line 2025 of file nfs4xdr.c.

void nfsd4_encode_operation ( struct nfsd4_compoundres resp,
struct nfsd4_op op 
)

Definition at line 3568 of file nfs4xdr.c.

void nfsd4_encode_replay ( struct nfsd4_compoundres resp,
struct nfsd4_op op 
)

Definition at line 3603 of file nfs4xdr.c.

int nfsd4_release_compoundargs ( void rq,
__be32 p,
void resp 
)

Definition at line 3626 of file nfs4xdr.c.