linux/fs/nfs/callback.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * linux/fs/nfs/callback.h
 *
 * Copyright (C) 2004 Trond Myklebust
 *
 * NFSv4 callback definitions
 */
#ifndef __LINUX_FS_NFS_CALLBACK_H
#define __LINUX_FS_NFS_CALLBACK_H
#include <linux/sunrpc/svc.h>

#define NFS4_CALLBACK
#define NFS4_CALLBACK_XDRSIZE
#define NFS4_CALLBACK_BUFSIZE

enum nfs4_callback_procnum {};

struct nfs4_slot;
struct cb_process_state {};

struct cb_compound_hdr_arg {};

struct cb_compound_hdr_res {};

struct cb_getattrargs {};

struct cb_getattrres {};

struct cb_recallargs {};

#if defined(CONFIG_NFS_V4_1)

struct referring_call {};

struct referring_call_list {};

struct cb_sequenceargs {};

struct cb_sequenceres {};

extern __be32 nfs4_callback_sequence(void *argp, void *resp,
				       struct cb_process_state *cps);

#define RCA4_TYPE_MASK_RDATA_DLG
#define RCA4_TYPE_MASK_WDATA_DLG
#define RCA4_TYPE_MASK_DIR_DLG
#define RCA4_TYPE_MASK_FILE_LAYOUT
#define RCA4_TYPE_MASK_BLK_LAYOUT
#define RCA4_TYPE_MASK_OBJ_LAYOUT_MIN
#define RCA4_TYPE_MASK_OBJ_LAYOUT_MAX
#define RCA4_TYPE_MASK_OTHER_LAYOUT_MIN
#define RCA4_TYPE_MASK_OTHER_LAYOUT_MAX
#define PNFS_FF_RCA4_TYPE_MASK_READ
#define PNFS_FF_RCA4_TYPE_MASK_RW
#define RCA4_TYPE_MASK_ALL

struct cb_recallanyargs {};

extern __be32 nfs4_callback_recallany(void *argp, void *resp,
					struct cb_process_state *cps);

struct cb_recallslotargs {};
extern __be32 nfs4_callback_recallslot(void *argp, void *resp,
					 struct cb_process_state *cps);

struct cb_layoutrecallargs {};

extern __be32 nfs4_callback_layoutrecall(void *argp, void *resp,
		struct cb_process_state *cps);

struct cb_devicenotifyitem {};

struct cb_devicenotifyargs {};

extern __be32 nfs4_callback_devicenotify(void *argp, void *resp,
		struct cb_process_state *cps);

struct cb_notify_lock_args {};

extern __be32 nfs4_callback_notify_lock(void *argp, void *resp,
					 struct cb_process_state *cps);
#endif /* CONFIG_NFS_V4_1 */
#ifdef CONFIG_NFS_V4_2
struct cb_offloadargs {};

extern __be32 nfs4_callback_offload(void *args, void *dummy,
				    struct cb_process_state *cps);
#endif /* CONFIG_NFS_V4_2 */
extern int check_gss_callback_principal(struct nfs_client *, struct svc_rqst *);
extern __be32 nfs4_callback_getattr(void *argp, void *resp,
				    struct cb_process_state *cps);
extern __be32 nfs4_callback_recall(void *argp, void *resp,
				   struct cb_process_state *cps);
#if IS_ENABLED(CONFIG_NFS_V4)
extern int nfs_callback_up(u32 minorversion, struct rpc_xprt *xprt);
extern void nfs_callback_down(int minorversion, struct net *net);
#endif /* CONFIG_NFS_V4 */
/*
 * nfs41: Callbacks are expected to not cause substantial latency,
 * so we limit their concurrency to 1 by setting up the maximum number
 * of slots for the backchannel.
 */
#define NFS41_BC_MIN_CALLBACKS
#define NFS41_BC_MAX_CALLBACKS

#define NFS4_MIN_NR_CALLBACK_THREADS

extern unsigned int nfs_callback_set_tcpport;
extern unsigned short nfs_callback_nr_threads;

#endif /* __LINUX_FS_NFS_CALLBACK_H */