ReactOS 0.4.16-dev-106-g10b08aa
delegation.h
Go to the documentation of this file.
1/* NFSv4.1 client for Windows
2 * Copyright © 2012 The Regents of the University of Michigan
3 *
4 * Olga Kornievskaia <aglo@umich.edu>
5 * Casey Bodley <cbodley@umich.edu>
6 *
7 * This library is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; either version 2.1 of the License, or (at
10 * your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful, but
13 * without any warranty; without even the implied warranty of merchantability
14 * or fitness for a particular purpose. See the GNU Lesser General Public
15 * License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 */
21
22#ifndef DELEGATION_H
23#define DELEGATION_H
24
25#include "nfs41.h"
26
27
28/* option to avoid conflicts by returning the delegation */
29#define DELEGATION_RETURN_ON_CONFLICT
30
31
32/* reference counting and cleanup */
35
38
41
42
43/* open delegation */
48 IN open_delegation4 *delegation,
49 IN bool_t try_recovery,
50 OUT nfs41_delegation_state **deleg_out);
51
55 IN OPTIONAL nfs41_file_info *createattrs,
57
60 IN bool_t try_recovery);
61
65
66/* synchronous delegation return */
67#ifdef DELEGATION_RETURN_ON_CONFLICT
71#ifndef __REACTOS__
73#else
74 IN int access,
75#endif
76 IN bool_t truncate);
77#else
82 IN bool_t truncate)
83{
84 return NFS4_OK;
85}
86#endif
87
88
89/* asynchronous delegation recall */
92 IN nfs41_fh *fh,
93 IN const stateid4 *stateid,
94 IN bool_t truncate);
95
98 IN const nfs41_fh *fh,
99 IN const bitmap4 *attr_request,
101
102
103/* after client state recovery, return any 'recalled' delegations;
104 * must be called under the client's state lock */
107
108/* attempt to return the least recently used delegation;
109 * fails with NFS4ERR_BADHANDLE if all delegations are in use */
112
113#endif /* DELEGATION_H */
#define open
Definition: acwin.h:95
static int state
Definition: maze.c:121
int nfs41_delegation_getattr(IN nfs41_client *client, IN const nfs41_fh *fh, IN const bitmap4 *attr_request, OUT nfs41_file_info *info)
Definition: delegation.c:783
void nfs41_client_delegation_free(IN nfs41_client *client)
Definition: delegation.c:828
int nfs41_delegation_to_open(IN nfs41_open_state *open, IN bool_t try_recovery)
Definition: delegation.c:539
void nfs41_delegation_deref(IN nfs41_delegation_state *state)
Definition: delegation.c:79
int nfs41_delegate_open(IN nfs41_open_state *state, IN uint32_t create, IN OPTIONAL nfs41_file_info *createattrs, OUT nfs41_file_info *info)
Definition: delegation.c:462
int nfs41_delegation_return(IN nfs41_session *session, IN nfs41_path_fh *file, IN enum open_delegation_type4 access, IN bool_t truncate)
Definition: delegation.c:629
int nfs41_client_delegation_recovery(IN nfs41_client *client)
Definition: delegation.c:861
int nfs41_delegation_recall(IN nfs41_client *client, IN nfs41_fh *fh, IN const stateid4 *stateid, IN bool_t truncate)
Definition: delegation.c:703
int nfs41_delegation_granted(IN nfs41_session *session, IN nfs41_path_fh *parent, IN nfs41_path_fh *file, IN open_delegation4 *delegation, IN bool_t try_recovery, OUT nfs41_delegation_state **deleg_out)
Definition: delegation.c:330
void nfs41_delegation_ref(IN nfs41_delegation_state *state)
Definition: delegation.c:71
int nfs41_client_delegation_return_lru(IN nfs41_client *client)
Definition: delegation.c:902
void nfs41_delegation_remove_srvopen(IN nfs41_session *session, IN nfs41_path_fh *file)
Definition: delegation.c:610
int32_t bool_t
Definition: types.h:101
UINT32 uint32_t
Definition: types.h:75
r parent
Definition: btrfs.c:3010
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
static const struct access_res create[16]
Definition: package.c:7505
@ NFS4_OK
Definition: nfs41_const.h:87
open_delegation_type4
Definition: nfs41_ops.h:585
static FILE * client
Definition: client.c:41
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: fci.c:127
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40