#include <linux/nfs_fs.h>
#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/sunrpc/addr.h>
#include "../internal.h"
#include "../nfs4session.h"
#include "flexfilelayout.h"
#define NFSDBG_FACILITY …
static unsigned int dataserver_timeo = …;
static unsigned int dataserver_retrans;
static bool ff_layout_has_available_ds(struct pnfs_layout_segment *lseg);
void nfs4_ff_layout_put_deviceid(struct nfs4_ff_layout_ds *mirror_ds)
{ … }
void nfs4_ff_layout_free_deviceid(struct nfs4_ff_layout_ds *mirror_ds)
{ … }
struct nfs4_ff_layout_ds *
nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
gfp_t gfp_flags)
{ … }
static void extend_ds_error(struct nfs4_ff_layout_ds_err *err,
u64 offset, u64 length)
{ … }
static int
ff_ds_error_match(const struct nfs4_ff_layout_ds_err *e1,
const struct nfs4_ff_layout_ds_err *e2)
{ … }
static void
ff_layout_add_ds_error_locked(struct nfs4_flexfile_layout *flo,
struct nfs4_ff_layout_ds_err *dserr)
{ … }
int ff_layout_track_ds_error(struct nfs4_flexfile_layout *flo,
struct nfs4_ff_layout_mirror *mirror, u64 offset,
u64 length, int status, enum nfs_opnum4 opnum,
gfp_t gfp_flags)
{ … }
static const struct cred *
ff_layout_get_mirror_cred(struct nfs4_ff_layout_mirror *mirror, u32 iomode)
{ … }
struct nfs_fh *
nfs4_ff_layout_select_ds_fh(struct nfs4_ff_layout_mirror *mirror)
{ … }
void
nfs4_ff_layout_select_ds_stateid(const struct nfs4_ff_layout_mirror *mirror,
nfs4_stateid *stateid)
{ … }
static bool
ff_layout_init_mirror_ds(struct pnfs_layout_hdr *lo,
struct nfs4_ff_layout_mirror *mirror)
{ … }
struct nfs4_pnfs_ds *
nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg,
struct nfs4_ff_layout_mirror *mirror,
bool fail_return)
{ … }
const struct cred *
ff_layout_get_ds_cred(struct nfs4_ff_layout_mirror *mirror,
const struct pnfs_layout_range *range,
const struct cred *mdscred)
{ … }
struct rpc_clnt *
nfs4_ff_find_or_create_ds_client(struct nfs4_ff_layout_mirror *mirror,
struct nfs_client *ds_clp, struct inode *inode)
{ … }
void ff_layout_free_ds_ioerr(struct list_head *head)
{ … }
int ff_layout_encode_ds_ioerr(struct xdr_stream *xdr, const struct list_head *head)
{ … }
static
unsigned int do_layout_fetch_ds_ioerr(struct pnfs_layout_hdr *lo,
const struct pnfs_layout_range *range,
struct list_head *head,
unsigned int maxnum)
{ … }
unsigned int ff_layout_fetch_ds_ioerr(struct pnfs_layout_hdr *lo,
const struct pnfs_layout_range *range,
struct list_head *head,
unsigned int maxnum)
{ … }
static bool ff_read_layout_has_available_ds(struct pnfs_layout_segment *lseg)
{ … }
static bool ff_rw_layout_has_available_ds(struct pnfs_layout_segment *lseg)
{ … }
static bool ff_layout_has_available_ds(struct pnfs_layout_segment *lseg)
{ … }
bool ff_layout_avoid_mds_available_ds(struct pnfs_layout_segment *lseg)
{ … }
bool ff_layout_avoid_read_on_rw(struct pnfs_layout_segment *lseg)
{ … }
module_param(dataserver_retrans, uint, 0644);
MODULE_PARM_DESC(…) …;
module_param(dataserver_timeo, uint, 0644);
MODULE_PARM_DESC(…) …;