79 dprintf(
CBSLVL,
" OP_CB_LAYOUTRECALL { %s, %s, recall %u } %s\n",
93 args->target_highest_slotid);
112 *session_out = cb_session;
117 eprintf(
"[cb] received sessionid doesn't match session\n");
123 if (
args->slotid != 0) {
124 eprintf(
"[cb] received unexpected slotid=%d\n",
args->slotid);
128 if (
args->highest_slotid != 0) {
129 eprintf(
"[cb] received unexpected highest_slotid=%d\n",
130 args->highest_slotid);
137 if (!cb_session->
replay.res.length) {
151 eprintf(
"[cb] bad received seq#=%d, expected=%d\n",
158 *cachethis =
args->cachethis;
161 res->ok.sequenceid =
args->sequenceid;
163 res->ok.highest_slotid =
args->highest_slotid;
164 res->ok.target_highest_slotid =
args->highest_slotid;
167 dprintf(
CBSLVL,
" OP_CB_SEQUENCE { seqid %u, slot %u, cachethis %d } "
168 "%s\n",
args->sequenceid,
args->slotid,
args->cachethis,
204 for (
i = 0;
i <
args->change_count;
i++) {
206 &
args->change_list[
i]);
221 session->replay.arg.length = 0;
222 session->replay.res.length = 0;
240 }
else if (cachethis) {
245 for (
i = 0;
i <
res->resarray_count;
i++) {
246 if (!
res->resarray[
i].xdr_ok) {
248 res->resarray_count =
i + 1;
281 for (
i = 0;
i <
res->resarray_count;
i++) {
283 if (
i >=
args->argarray_count)
287 if (
args->argarray[
i].opnum !=
res->resarray[
i].opnum)
290 if (
res->resarray[
i].res.status)
307 if (replay ==
NULL) {
308 eprintf(
"[cb] failed to allocate replay buffer\n");
317 eprintf(
"[cb] failed to decode replay buffer\n");
319 goto out_free_replay;
323 if (
session->replay.arg.length) {
325 eprintf(
"[cb] retry attempt with different arguments\n");
327 goto out_free_replay;
331 eprintf(
"[cb] retry attempt with different operations\n");
333 goto out_free_replay;
341 dprintf(2,
"[cb] retry: returning cached response\n");
370 eprintf(
"failed to decode compound arguments\n");
390 if (
args.minorversion != 1) {
392 eprintf(
"args.minorversion %u != 1\n",
args.minorversion);
398 argop = &
args.argarray[
i];
399 resop = &
res->resarray[
i];
401 res->resarray_count++;
422 switch (argop->
opnum) {
424 dprintf(1,
"OP_CB_LAYOUTRECALL\n");
429 dprintf(1,
"OP_CB_RECALL_SLOT\n");
434 dprintf(1,
"OP_CB_SEQUENCE\n");
463 dprintf(1,
"OP_CB_PUSH_DELEG\n");
467 dprintf(1,
"OP_CB_RECALL_ANY\n");
471 dprintf(1,
"OP_CB_RECALLABLE_OBJ_AVAIL\n");
475 dprintf(1,
"OP_CB_WANTS_CANCELLED\n");
479 dprintf(1,
"OP_CB_NOTIFY_LOCK\n");
483 dprintf(1,
"OP_CB_NOTIFY_DEVICEID\n");
506 dprintf(
CBSLVL,
"<-- handle_cb_compound() returning %s (%u results)\n",
508 res ?
res->resarray_count : 0);
523 dprintf(1,
"nfs41_handle_callback: received call\n");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
int nfs41_handle_callback(void *rpc_clnt, void *cb, struct cb_compound_res **reply)
static int replay_cache_read(IN nfs41_cb_session *session, IN struct cb_compound_args *args, OUT struct cb_compound_res **res_out)
static enum_t handle_cb_recall_slot(IN nfs41_rpc_clnt *rpc_clnt, IN struct cb_recall_slot_args *args, OUT struct cb_recall_slot_res *res)
static const char g_server_tag[]
static bool_t replay_validate_args(IN struct cb_compound_args *args, IN const struct replay_cache *cache)
static enum_t handle_cb_recall(IN nfs41_rpc_clnt *rpc_clnt, IN struct cb_recall_args *args, OUT struct cb_recall_res *res)
static enum_t handle_cb_sequence(IN nfs41_rpc_clnt *rpc_clnt, IN struct cb_sequence_args *args, OUT struct cb_sequence_res *res, OUT nfs41_cb_session **session_out, OUT bool_t *cachethis)
static bool_t replay_validate_ops(IN const struct cb_compound_args *args, IN const struct cb_compound_res *res)
void nfs41_callback_session_init(IN nfs41_session *session)
static void replay_cache_write(IN nfs41_cb_session *session, IN struct cb_compound_args *args, IN struct cb_compound_res *res, IN bool_t cachethis)
static enum_t handle_cb_getattr(IN nfs41_rpc_clnt *rpc_clnt, IN struct cb_getattr_args *args, OUT struct cb_getattr_res *res)
static enum_t handle_cb_notify_deviceid(IN nfs41_rpc_clnt *rpc_clnt, IN struct cb_notify_deviceid_args *args, OUT struct cb_notify_deviceid_res *res)
static enum_t handle_cb_layoutrecall(IN nfs41_rpc_clnt *rpc_clnt, IN struct cb_layoutrecall_args *args, OUT struct cb_layoutrecall_res *res)
static void handle_cb_compound(nfs41_rpc_clnt *rpc_clnt, cb_req *req, struct cb_compound_res **reply)
bool_t proc_cb_compound_args(XDR *xdr, struct cb_compound_args *args)
bool_t proc_cb_compound_res(XDR *xdr, struct cb_compound_res *res)
void eprintf(LPCSTR format,...)
const char * nfs_error_string(int status)
const char * pnfs_iomode_string(enum pnfs_iomode iomode)
const char * pnfs_layout_type_string(enum pnfs_layout_type type)
int nfs41_delegation_getattr(IN nfs41_client *client, IN const nfs41_fh *fh, IN const bitmap4 *attr_request, OUT nfs41_file_info *info)
int nfs41_delegation_recall(IN nfs41_client *client, IN nfs41_fh *fh, IN const stateid4 *stateid, IN bool_t truncate)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
static HMODULE MODULEINFO DWORD cb
int nfs41_session_recall_slot(IN nfs41_session *session, IN OUT uint32_t target_highest_slotid)
#define CB_COMPOUND_MAX_TAG
@ OP_CB_RECALLABLE_OBJ_AVAIL
#define NFS41_RPC_CBPROGRAM
#define NFS4_SESSIONID_SIZE
@ NFS4ERR_OP_NOT_IN_SESSION
@ NFS4ERR_REP_TOO_BIG_TO_CACHE
@ NFS4ERR_RETRY_UNCACHED_REP
@ NFS4ERR_MINOR_VERS_MISMATCH
@ NFS4ERR_NOMATCHING_LAYOUT
@ NFS4ERR_SEQ_FALSE_RETRY
#define NFS41_MAX_SERVER_CACHE
enum pnfs_status pnfs_file_device_notify(IN struct pnfs_file_device_list *devices, IN const struct notify_deviceid4 *change)
enum pnfs_status pnfs_file_layout_recall(IN struct __nfs41_client *client, IN const struct cb_layoutrecall_args *recall)
PULONG MinorVersion OPTIONAL
STRSAFEAPI StringCchCopyA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc)
struct __nfs41_cb_session::@32 replay
const unsigned char * cb_sessionid
struct cb_recall_args recall
struct cb_sequence_args sequence
struct cb_getattr_args getattr
struct cb_recall_slot_args recall_slot
struct cb_layoutrecall_args layoutrecall
struct cb_getattr_res getattr
struct cb_sequence_res sequence
struct cb_layoutrecall_res layoutrecall
struct cb_recall_slot_res recall_slot
struct cb_recall_res recall
void xdrmem_create(XDR *xdrs, char *addr, u_int size, enum xdr_op op)