#include <linux/blkdev.h>
#include <linux/kmod.h>
#include <linux/file.h>
#include <linux/jhash.h>
#include <linux/sched.h>
#include <linux/sunrpc/addr.h>
#include "pnfs.h"
#include "netns.h"
#include "trace.h"
#define NFSDDBG_FACILITY …
struct nfs4_layout { … };
static struct kmem_cache *nfs4_layout_cache;
static struct kmem_cache *nfs4_layout_stateid_cache;
static const struct nfsd4_callback_ops nfsd4_cb_layout_ops;
static const struct lease_manager_operations nfsd4_layouts_lm_ops;
const struct nfsd4_layout_ops *nfsd4_layout_ops[LAYOUT_TYPE_MAX] = …;
#define DEVID_HASH_BITS …
#define DEVID_HASH_SIZE …
#define DEVID_HASH_MASK …
static u64 nfsd_devid_seq = …;
static struct list_head nfsd_devid_hash[DEVID_HASH_SIZE];
static DEFINE_SPINLOCK(nfsd_devid_lock);
static inline u32 devid_hashfn(u64 idx)
{ … }
static void
nfsd4_alloc_devid_map(const struct svc_fh *fhp)
{ … }
struct nfsd4_deviceid_map *
nfsd4_find_devid_map(int idx)
{ … }
int
nfsd4_set_deviceid(struct nfsd4_deviceid *id, const struct svc_fh *fhp,
u32 device_generation)
{ … }
void nfsd4_setup_layout_type(struct svc_export *exp)
{ … }
void nfsd4_close_layout(struct nfs4_layout_stateid *ls)
{ … }
static void
nfsd4_free_layout_stateid(struct nfs4_stid *stid)
{ … }
static int
nfsd4_layout_setlease(struct nfs4_layout_stateid *ls)
{ … }
static struct nfs4_layout_stateid *
nfsd4_alloc_layout_stateid(struct nfsd4_compound_state *cstate,
struct nfs4_stid *parent, u32 layout_type)
{ … }
__be32
nfsd4_preprocess_layout_stateid(struct svc_rqst *rqstp,
struct nfsd4_compound_state *cstate, stateid_t *stateid,
bool create, u32 layout_type, struct nfs4_layout_stateid **lsp)
{ … }
static void
nfsd4_recall_file_layout(struct nfs4_layout_stateid *ls)
{ … }
static inline u64
layout_end(struct nfsd4_layout_seg *seg)
{ … }
static void
layout_update_len(struct nfsd4_layout_seg *lo, u64 end)
{ … }
static bool
layouts_overlapping(struct nfs4_layout *lo, struct nfsd4_layout_seg *s)
{ … }
static bool
layouts_try_merge(struct nfsd4_layout_seg *lo, struct nfsd4_layout_seg *new)
{ … }
static __be32
nfsd4_recall_conflict(struct nfs4_layout_stateid *ls)
{ … }
__be32
nfsd4_insert_layout(struct nfsd4_layoutget *lgp, struct nfs4_layout_stateid *ls)
{ … }
static void
nfsd4_free_layouts(struct list_head *reaplist)
{ … }
static void
nfsd4_return_file_layout(struct nfs4_layout *lp, struct nfsd4_layout_seg *seg,
struct list_head *reaplist)
{ … }
__be32
nfsd4_return_file_layouts(struct svc_rqst *rqstp,
struct nfsd4_compound_state *cstate,
struct nfsd4_layoutreturn *lrp)
{ … }
__be32
nfsd4_return_client_layouts(struct svc_rqst *rqstp,
struct nfsd4_compound_state *cstate,
struct nfsd4_layoutreturn *lrp)
{ … }
static void
nfsd4_return_all_layouts(struct nfs4_layout_stateid *ls,
struct list_head *reaplist)
{ … }
void
nfsd4_return_all_client_layouts(struct nfs4_client *clp)
{ … }
void
nfsd4_return_all_file_layouts(struct nfs4_client *clp, struct nfs4_file *fp)
{ … }
static void
nfsd4_cb_layout_fail(struct nfs4_layout_stateid *ls, struct nfsd_file *file)
{ … }
static void
nfsd4_cb_layout_prepare(struct nfsd4_callback *cb)
{ … }
static int
nfsd4_cb_layout_done(struct nfsd4_callback *cb, struct rpc_task *task)
{ … }
static void
nfsd4_cb_layout_release(struct nfsd4_callback *cb)
{ … }
static const struct nfsd4_callback_ops nfsd4_cb_layout_ops = …;
static bool
nfsd4_layout_lm_break(struct file_lease *fl)
{ … }
static int
nfsd4_layout_lm_change(struct file_lease *onlist, int arg,
struct list_head *dispose)
{ … }
static const struct lease_manager_operations nfsd4_layouts_lm_ops = …;
int
nfsd4_init_pnfs(void)
{ … }
void
nfsd4_exit_pnfs(void)
{ … }