43 if (
state->locks.stateid.seqid) {
46 }
else if (
state->do_close) {
61 if (
state->locks.stateid.seqid == 0) {
64 }
else if (stateid->seqid >
state->locks.stateid.seqid) {
66 state->locks.stateid.seqid = stateid->seqid;
93 if (
open->delegation.state) {
110#define lock_entry(pos) list_container(pos, nfs41_lock_state, open_entry)
134 if (
lock->delegated) {
183 dprintf(1,
"parsing NFS41_LOCK: offset=0x%llx length=0x%llx exclusive=%u "
274 dprintf(1,
"--> cancel_lock()\n");
316 dprintf(1,
"parsing NFS41_UNLOCK: count=%u\n",
args->count);
327 unsigned char *
buf =
args->buf;
332 for (
i = 0;
i <
args->count;
i++) {
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static struct list_entry * list_search(const struct list_entry *head, const void *value, list_compare_fn compare)
static void cancel_lock(IN nfs41_upcall *upcall)
static int handle_unlock(nfs41_upcall *upcall)
static void open_lock_add(IN nfs41_open_state *open, IN const stateid_arg *stateid, IN nfs41_lock_state *lock)
static int open_unlock_delegate(IN nfs41_open_state *open, IN const nfs41_lock_state *input)
static int handle_lock(nfs41_upcall *upcall)
static __inline uint32_t get_lock_type(BOOLEAN exclusive, BOOLEAN blocking)
static void open_unlock_remove(IN nfs41_open_state *open, IN const stateid_arg *stateid, IN const nfs41_lock_state *input)
static void lock_stateid_update(OUT nfs41_open_state *state, IN const stateid4 *stateid)
static int parse_lock(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall)
const nfs41_upcall_op nfs41_op_unlock
static void lock_stateid_arg(IN nfs41_open_state *state, OUT stateid_arg *arg)
const nfs41_upcall_op nfs41_op_lock
static int parse_unlock(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall)
static bool_t open_lock_delegate(IN nfs41_open_state *open, IN nfs41_lock_state *lock)
static int lock_range_cmp(const struct list_entry *entry, const void *value)
int safe_read(unsigned char **pos, uint32_t *remaining, void *dest, uint32_t dest_len)
int nfs_to_windows_error(int status, int default_error)
const char * nfs_error_string(int status)
int nfs41_delegation_to_open(IN nfs41_open_state *open, IN bool_t try_recovery)
VOID WINAPI ReleaseSRWLockShared(PSRWLOCK Lock)
VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK Lock)
VOID WINAPI AcquireSRWLockShared(PSRWLOCK Lock)
VOID WINAPI ReleaseSRWLockExclusive(PSRWLOCK Lock)
GLuint GLuint GLsizei GLenum type
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum input
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)
nfs41_updowncall_list upcall
int nfs41_lock(IN nfs41_session *session, IN nfs41_path_fh *file, IN state_owner4 *owner, IN uint32_t type, IN uint64_t offset, IN uint64_t length, IN bool_t reclaim, IN bool_t try_recovery, IN OUT stateid_arg *stateid)
int nfs41_unlock(IN nfs41_session *session, IN nfs41_path_fh *file, IN uint64_t offset, IN uint64_t length, IN OUT stateid_arg *stateid)
static const uint64_t NFS4_UINT64_MAX
enum delegation_status status
enum open_delegation_type4 type
DWORD WINAPI GetLastError(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define ERROR_BAD_NET_RESP
#define ERROR_FILE_INVALID