linux/fs/nfs/nfs42xdr.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2014 Anna Schumaker <[email protected]>
 */
#ifndef __LINUX_FS_NFS_NFS4_2XDR_H
#define __LINUX_FS_NFS_NFS4_2XDR_H

#include "nfs42.h"

/* Not limited by NFS itself, limited by the generic xattr code */
#define nfs4_xattr_name_maxsz

#define encode_fallocate_maxsz
#define NFS42_WRITE_RES_SIZE
#define encode_allocate_maxsz
#define decode_allocate_maxsz
#define encode_copy_maxsz
#define decode_copy_maxsz
#define encode_offload_cancel_maxsz
#define decode_offload_cancel_maxsz
#define encode_copy_notify_maxsz
#define decode_copy_notify_maxsz
#define encode_deallocate_maxsz
#define decode_deallocate_maxsz
#define encode_read_plus_maxsz
#define NFS42_READ_PLUS_DATA_SEGMENT_SIZE
#define NFS42_READ_PLUS_HOLE_SEGMENT_SIZE
#define READ_PLUS_SEGMENT_SIZE_DIFF
#define decode_read_plus_maxsz
#define encode_seek_maxsz
#define decode_seek_maxsz
#define encode_io_info_maxsz
#define encode_layoutstats_maxsz
#define decode_layoutstats_maxsz
#define encode_device_error_maxsz
#define encode_layouterror_maxsz
#define decode_layouterror_maxsz
#define encode_clone_maxsz
#define decode_clone_maxsz
#define encode_getxattr_maxsz
#define decode_getxattr_maxsz
#define encode_setxattr_maxsz
#define decode_setxattr_maxsz
#define encode_listxattrs_maxsz
#define decode_listxattrs_maxsz
#define encode_removexattr_maxsz
#define decode_removexattr_maxsz

#define NFS4_enc_allocate_sz
#define NFS4_dec_allocate_sz
#define NFS4_enc_copy_sz
#define NFS4_dec_copy_sz
#define NFS4_enc_offload_cancel_sz
#define NFS4_dec_offload_cancel_sz
#define NFS4_enc_copy_notify_sz
#define NFS4_dec_copy_notify_sz
#define NFS4_enc_deallocate_sz
#define NFS4_dec_deallocate_sz
#define NFS4_enc_read_plus_sz
#define NFS4_dec_read_plus_sz
#define NFS4_enc_seek_sz
#define NFS4_dec_seek_sz
#define NFS4_enc_layoutstats_sz
#define NFS4_dec_layoutstats_sz
#define NFS4_enc_layouterror_sz
#define NFS4_dec_layouterror_sz
#define NFS4_enc_clone_sz
#define NFS4_dec_clone_sz
#define NFS4_enc_getxattr_sz
#define NFS4_dec_getxattr_sz
#define NFS4_enc_setxattr_sz
#define NFS4_dec_setxattr_sz
#define NFS4_enc_listxattrs_sz
#define NFS4_dec_listxattrs_sz
#define NFS4_enc_removexattr_sz
#define NFS4_dec_removexattr_sz

/*
 * These values specify the maximum amount of data that is not
 * associated with the extended attribute name or extended
 * attribute list in the SETXATTR, GETXATTR and LISTXATTR
 * respectively.
 */
const u32 nfs42_maxsetxattr_overhead =;

const u32 nfs42_maxgetxattr_overhead =;

const u32 nfs42_maxlistxattrs_overhead =;

static void encode_fallocate(struct xdr_stream *xdr,
			     const struct nfs42_falloc_args *args)
{}

static void encode_allocate(struct xdr_stream *xdr,
			    const struct nfs42_falloc_args *args,
			    struct compound_hdr *hdr)
{}

static void encode_nl4_server(struct xdr_stream *xdr,
			      const struct nl4_server *ns)
{}

static void encode_copy(struct xdr_stream *xdr,
			const struct nfs42_copy_args *args,
			struct compound_hdr *hdr)
{}

static void encode_copy_commit(struct xdr_stream *xdr,
			  const struct nfs42_copy_args *args,
			  struct compound_hdr *hdr)
{}

static void encode_offload_cancel(struct xdr_stream *xdr,
				  const struct nfs42_offload_status_args *args,
				  struct compound_hdr *hdr)
{}

static void encode_copy_notify(struct xdr_stream *xdr,
			       const struct nfs42_copy_notify_args *args,
			       struct compound_hdr *hdr)
{}

static void encode_deallocate(struct xdr_stream *xdr,
			      const struct nfs42_falloc_args *args,
			      struct compound_hdr *hdr)
{}

static void encode_read_plus(struct xdr_stream *xdr,
			     const struct nfs_pgio_args *args,
			     struct compound_hdr *hdr)
{}

static void encode_seek(struct xdr_stream *xdr,
			const struct nfs42_seek_args *args,
			struct compound_hdr *hdr)
{}

static void encode_layoutstats(struct xdr_stream *xdr,
			       const struct nfs42_layoutstat_args *args,
			       struct nfs42_layoutstat_devinfo *devinfo,
			       struct compound_hdr *hdr)
{}

static void encode_clone(struct xdr_stream *xdr,
			 const struct nfs42_clone_args *args,
			 struct compound_hdr *hdr)
{}

static void encode_device_error(struct xdr_stream *xdr,
				const struct nfs42_device_error *error)
{}

static void encode_layouterror(struct xdr_stream *xdr,
			       const struct nfs42_layout_error *args,
			       struct compound_hdr *hdr)
{}

static void encode_setxattr(struct xdr_stream *xdr,
			    const struct nfs42_setxattrargs *arg,
			    struct compound_hdr *hdr)
{}

static void encode_getxattr(struct xdr_stream *xdr, const char *name,
			    struct compound_hdr *hdr)
{}

static void encode_removexattr(struct xdr_stream *xdr, const char *name,
			       struct compound_hdr *hdr)
{}

static void encode_listxattrs(struct xdr_stream *xdr,
			     const struct nfs42_listxattrsargs *arg,
			     struct compound_hdr *hdr)
{}

/*
 * Encode ALLOCATE request
 */
static void nfs4_xdr_enc_allocate(struct rpc_rqst *req,
				  struct xdr_stream *xdr,
				  const void *data)
{}

/*
 * Encode COPY request
 */
static void nfs4_xdr_enc_copy(struct rpc_rqst *req,
			      struct xdr_stream *xdr,
			      const void *data)
{}

/*
 * Encode OFFLOAD_CANEL request
 */
static void nfs4_xdr_enc_offload_cancel(struct rpc_rqst *req,
					struct xdr_stream *xdr,
					const void *data)
{}

/*
 * Encode COPY_NOTIFY request
 */
static void nfs4_xdr_enc_copy_notify(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     const void *data)
{}

/*
 * Encode DEALLOCATE request
 */
static void nfs4_xdr_enc_deallocate(struct rpc_rqst *req,
				    struct xdr_stream *xdr,
				    const void *data)
{}

/*
 * Encode READ_PLUS request
 */
static void nfs4_xdr_enc_read_plus(struct rpc_rqst *req,
				   struct xdr_stream *xdr,
				   const void *data)
{}

/*
 * Encode SEEK request
 */
static void nfs4_xdr_enc_seek(struct rpc_rqst *req,
			      struct xdr_stream *xdr,
			      const void *data)
{}

/*
 * Encode LAYOUTSTATS request
 */
static void nfs4_xdr_enc_layoutstats(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     const void *data)
{}

/*
 * Encode CLONE request
 */
static void nfs4_xdr_enc_clone(struct rpc_rqst *req,
			       struct xdr_stream *xdr,
			       const void *data)
{}

/*
 * Encode LAYOUTERROR request
 */
static void nfs4_xdr_enc_layouterror(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     const void *data)
{}

/*
 * Encode SETXATTR request
 */
static void nfs4_xdr_enc_setxattr(struct rpc_rqst *req, struct xdr_stream *xdr,
				  const void *data)
{}

/*
 * Encode GETXATTR request
 */
static void nfs4_xdr_enc_getxattr(struct rpc_rqst *req, struct xdr_stream *xdr,
				  const void *data)
{}

/*
 * Encode LISTXATTR request
 */
static void nfs4_xdr_enc_listxattrs(struct rpc_rqst *req,
				    struct xdr_stream *xdr, const void *data)
{}

/*
 * Encode REMOVEXATTR request
 */
static void nfs4_xdr_enc_removexattr(struct rpc_rqst *req,
				     struct xdr_stream *xdr, const void *data)
{}

static int decode_allocate(struct xdr_stream *xdr, struct nfs42_falloc_res *res)
{}

static int decode_write_response(struct xdr_stream *xdr,
				 struct nfs42_write_res *res)
{}

static int decode_nl4_server(struct xdr_stream *xdr, struct nl4_server *ns)
{}

static int decode_copy_requirements(struct xdr_stream *xdr,
				    struct nfs42_copy_res *res) {}

static int decode_copy(struct xdr_stream *xdr, struct nfs42_copy_res *res)
{}

static int decode_offload_cancel(struct xdr_stream *xdr,
				 struct nfs42_offload_status_res *res)
{}

static int decode_copy_notify(struct xdr_stream *xdr,
			      struct nfs42_copy_notify_res *res)
{}

static int decode_deallocate(struct xdr_stream *xdr, struct nfs42_falloc_res *res)
{}

struct read_plus_segment {};

static inline uint64_t read_plus_segment_length(struct read_plus_segment *seg)
{}

static int decode_read_plus_segment(struct xdr_stream *xdr,
				    struct read_plus_segment *seg)
{}

static int process_read_plus_segment(struct xdr_stream *xdr,
				     struct nfs_pgio_args *args,
				     struct nfs_pgio_res *res,
				     struct read_plus_segment *seg)
{}

static int decode_read_plus(struct xdr_stream *xdr, struct nfs_pgio_res *res)
{}

static int decode_seek(struct xdr_stream *xdr, struct nfs42_seek_res *res)
{}

static int decode_layoutstats(struct xdr_stream *xdr)
{}

static int decode_clone(struct xdr_stream *xdr)
{}

static int decode_layouterror(struct xdr_stream *xdr)
{}

static int decode_setxattr(struct xdr_stream *xdr,
			   struct nfs4_change_info *cinfo)
{}

static int decode_getxattr(struct xdr_stream *xdr,
			   struct nfs42_getxattrres *res,
			   struct rpc_rqst *req)
{}

static int decode_removexattr(struct xdr_stream *xdr,
			   struct nfs4_change_info *cinfo)
{}

static int decode_listxattrs(struct xdr_stream *xdr,
			    struct nfs42_listxattrsres *res)
{}

/*
 * Decode ALLOCATE request
 */
static int nfs4_xdr_dec_allocate(struct rpc_rqst *rqstp,
				 struct xdr_stream *xdr,
				 void *data)
{}

/*
 * Decode COPY response
 */
static int nfs4_xdr_dec_copy(struct rpc_rqst *rqstp,
			     struct xdr_stream *xdr,
			     void *data)
{}

/*
 * Decode OFFLOAD_CANCEL response
 */
static int nfs4_xdr_dec_offload_cancel(struct rpc_rqst *rqstp,
				       struct xdr_stream *xdr,
				       void *data)
{}

/*
 * Decode COPY_NOTIFY response
 */
static int nfs4_xdr_dec_copy_notify(struct rpc_rqst *rqstp,
				    struct xdr_stream *xdr,
				    void *data)
{}

/*
 * Decode DEALLOCATE request
 */
static int nfs4_xdr_dec_deallocate(struct rpc_rqst *rqstp,
				   struct xdr_stream *xdr,
				   void *data)
{}

/*
 * Decode READ_PLUS request
 */
static int nfs4_xdr_dec_read_plus(struct rpc_rqst *rqstp,
				  struct xdr_stream *xdr,
				  void *data)
{}

/*
 * Decode SEEK request
 */
static int nfs4_xdr_dec_seek(struct rpc_rqst *rqstp,
			     struct xdr_stream *xdr,
			     void *data)
{}

/*
 * Decode LAYOUTSTATS request
 */
static int nfs4_xdr_dec_layoutstats(struct rpc_rqst *rqstp,
				    struct xdr_stream *xdr,
				    void *data)
{}

/*
 * Decode CLONE request
 */
static int nfs4_xdr_dec_clone(struct rpc_rqst *rqstp,
			      struct xdr_stream *xdr,
			      void *data)
{}

/*
 * Decode LAYOUTERROR request
 */
static int nfs4_xdr_dec_layouterror(struct rpc_rqst *rqstp,
				    struct xdr_stream *xdr,
				    void *data)
{}

/*
 * Decode SETXATTR request
 */
static int nfs4_xdr_dec_setxattr(struct rpc_rqst *req, struct xdr_stream *xdr,
				 void *data)
{}

/*
 * Decode GETXATTR request
 */
static int nfs4_xdr_dec_getxattr(struct rpc_rqst *rqstp,
				 struct xdr_stream *xdr, void *data)
{}

/*
 * Decode LISTXATTR request
 */
static int nfs4_xdr_dec_listxattrs(struct rpc_rqst *rqstp,
				   struct xdr_stream *xdr, void *data)
{}

/*
 * Decode REMOVEXATTR request
 */
static int nfs4_xdr_dec_removexattr(struct rpc_rqst *req,
				    struct xdr_stream *xdr, void *data)
{}
#endif /* __LINUX_FS_NFS_NFS4_2XDR_H */