#include <linux/fs.h>
#include <linux/sunrpc/addr.h>
#include <linux/sunrpc/sched.h>
#include <linux/nfs.h>
#include <linux/nfs3.h>
#include <linux/nfs4.h>
#include <linux/nfs_xdr.h>
#include <linux/nfs_fs.h>
#include "nfs4_fs.h"
#include "nfs42.h"
#include "iostat.h"
#include "pnfs.h"
#include "nfs4session.h"
#include "internal.h"
#include "delegation.h"
#include "nfs4trace.h"
#define NFSDBG_FACILITY …
static int nfs42_do_offload_cancel_async(struct file *dst, nfs4_stateid *std);
static void nfs42_set_netaddr(struct file *filep, struct nfs42_netaddr *naddr)
{ … }
static int _nfs42_proc_fallocate(struct rpc_message *msg, struct file *filep,
struct nfs_lock_context *lock, loff_t offset, loff_t len)
{ … }
static int nfs42_proc_fallocate(struct rpc_message *msg, struct file *filep,
loff_t offset, loff_t len)
{ … }
int nfs42_proc_allocate(struct file *filep, loff_t offset, loff_t len)
{ … }
int nfs42_proc_deallocate(struct file *filep, loff_t offset, loff_t len)
{ … }
static int handle_async_copy(struct nfs42_copy_res *res,
struct nfs_server *dst_server,
struct nfs_server *src_server,
struct file *src,
struct file *dst,
nfs4_stateid *src_stateid,
bool *restart)
{ … }
static int process_copy_commit(struct file *dst, loff_t pos_dst,
struct nfs42_copy_res *res)
{ … }
static void nfs42_copy_dest_done(struct inode *inode, loff_t pos, loff_t len)
{ … }
static ssize_t _nfs42_proc_copy(struct file *src,
struct nfs_lock_context *src_lock,
struct file *dst,
struct nfs_lock_context *dst_lock,
struct nfs42_copy_args *args,
struct nfs42_copy_res *res,
struct nl4_server *nss,
nfs4_stateid *cnr_stateid,
bool *restart)
{ … }
ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src,
struct file *dst, loff_t pos_dst, size_t count,
struct nl4_server *nss,
nfs4_stateid *cnr_stateid, bool sync)
{ … }
struct nfs42_offloadcancel_data { … };
static void nfs42_offload_cancel_prepare(struct rpc_task *task, void *calldata)
{ … }
static void nfs42_offload_cancel_done(struct rpc_task *task, void *calldata)
{ … }
static void nfs42_free_offloadcancel_data(void *data)
{ … }
static const struct rpc_call_ops nfs42_offload_cancel_ops = …;
static int nfs42_do_offload_cancel_async(struct file *dst,
nfs4_stateid *stateid)
{ … }
static int _nfs42_proc_copy_notify(struct file *src, struct file *dst,
struct nfs42_copy_notify_args *args,
struct nfs42_copy_notify_res *res)
{ … }
int nfs42_proc_copy_notify(struct file *src, struct file *dst,
struct nfs42_copy_notify_res *res)
{ … }
static loff_t _nfs42_proc_llseek(struct file *filep,
struct nfs_lock_context *lock, loff_t offset, int whence)
{ … }
loff_t nfs42_proc_llseek(struct file *filep, loff_t offset, int whence)
{ … }
static void
nfs42_layoutstat_prepare(struct rpc_task *task, void *calldata)
{ … }
static void
nfs42_layoutstat_done(struct rpc_task *task, void *calldata)
{ … }
static void
nfs42_layoutstat_release(void *calldata)
{ … }
static const struct rpc_call_ops nfs42_layoutstat_ops = …;
int nfs42_proc_layoutstats_generic(struct nfs_server *server,
struct nfs42_layoutstat_data *data)
{ … }
static struct nfs42_layouterror_data *
nfs42_alloc_layouterror_data(struct pnfs_layout_segment *lseg, gfp_t gfp_flags)
{ … }
static void
nfs42_free_layouterror_data(struct nfs42_layouterror_data *data)
{ … }
static void
nfs42_layouterror_prepare(struct rpc_task *task, void *calldata)
{ … }
static void
nfs42_layouterror_done(struct rpc_task *task, void *calldata)
{ … }
static void
nfs42_layouterror_release(void *calldata)
{ … }
static const struct rpc_call_ops nfs42_layouterror_ops = …;
int nfs42_proc_layouterror(struct pnfs_layout_segment *lseg,
const struct nfs42_layout_error *errors, size_t n)
{ … }
EXPORT_SYMBOL_GPL(…);
static int _nfs42_proc_clone(struct rpc_message *msg, struct file *src_f,
struct file *dst_f, struct nfs_lock_context *src_lock,
struct nfs_lock_context *dst_lock, loff_t src_offset,
loff_t dst_offset, loff_t count)
{ … }
int nfs42_proc_clone(struct file *src_f, struct file *dst_f,
loff_t src_offset, loff_t dst_offset, loff_t count)
{ … }
#define NFS4XATTR_MAXPAGES …
static int _nfs42_proc_removexattr(struct inode *inode, const char *name)
{ … }
static int _nfs42_proc_setxattr(struct inode *inode, const char *name,
const void *buf, size_t buflen, int flags)
{ … }
static ssize_t _nfs42_proc_getxattr(struct inode *inode, const char *name,
void *buf, size_t buflen, struct page **pages,
size_t plen)
{ … }
static ssize_t _nfs42_proc_listxattrs(struct inode *inode, void *buf,
size_t buflen, u64 *cookiep, bool *eofp)
{ … }
ssize_t nfs42_proc_getxattr(struct inode *inode, const char *name,
void *buf, size_t buflen)
{ … }
int nfs42_proc_setxattr(struct inode *inode, const char *name,
const void *buf, size_t buflen, int flags)
{ … }
ssize_t nfs42_proc_listxattrs(struct inode *inode, void *buf,
size_t buflen, u64 *cookiep, bool *eofp)
{ … }
int nfs42_proc_removexattr(struct inode *inode, const char *name)
{ … }