1 /* NFSv4.1 client for Windows
2 * Copyright © 2012 The Regents of the University of Michigan
4 * Olga Kornievskaia <aglo@umich.edu>
5 * Casey Bodley <cbodley@umich.edu>
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.
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.
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
22 #ifndef __NFS41_DAEMON_NAME_CACHE_H__
23 #define __NFS41_DAEMON_NAME_CACHE_H__
28 static __inline
struct nfs41_name_cache
* client_name_cache(
29 IN nfs41_client
*client
)
31 return client_server(client
)->name_cache
;
34 static __inline
struct nfs41_name_cache
* session_name_cache(
35 IN nfs41_session
*session
)
37 return client_name_cache(session
->client
);
42 int nfs41_attr_cache_lookup(
43 IN
struct nfs41_name_cache
*cache
,
45 OUT nfs41_file_info
*info_out
);
47 int nfs41_attr_cache_update(
48 IN
struct nfs41_name_cache
*cache
,
50 IN
const nfs41_file_info
*info
);
54 int nfs41_name_cache_create(
55 OUT
struct nfs41_name_cache
**cache_out
);
57 int nfs41_name_cache_free(
58 IN OUT
struct nfs41_name_cache
**cache_out
);
60 int nfs41_name_cache_lookup(
61 IN
struct nfs41_name_cache
*cache
,
63 IN
const char *path_end
,
64 OUT OPTIONAL
const char **remaining_path_out
,
65 OUT OPTIONAL nfs41_fh
*parent_out
,
66 OUT OPTIONAL nfs41_fh
*target_out
,
67 OUT OPTIONAL nfs41_file_info
*info_out
,
68 OUT OPTIONAL bool_t
*is_negative
);
70 int nfs41_name_cache_insert(
71 IN
struct nfs41_name_cache
*cache
,
73 IN
const nfs41_component
*name
,
74 IN OPTIONAL
const nfs41_fh
*fh
,
75 IN OPTIONAL
const nfs41_file_info
*info
,
76 IN OPTIONAL
const change_info4
*cinfo
,
77 IN
enum open_delegation_type4 delegation
);
79 int nfs41_name_cache_delegreturn(
80 IN
struct nfs41_name_cache
*cache
,
83 IN
const nfs41_component
*name
);
85 int nfs41_name_cache_remove(
86 IN
struct nfs41_name_cache
*cache
,
88 IN
const nfs41_component
*name
,
90 IN
const change_info4
*cinfo
);
92 int nfs41_name_cache_rename(
93 IN
struct nfs41_name_cache
*cache
,
94 IN
const char *src_path
,
95 IN
const nfs41_component
*src_name
,
96 IN
const change_info4
*src_cinfo
,
97 IN
const char *dst_path
,
98 IN
const nfs41_component
*dst_name
,
99 IN
const change_info4
*dst_cinfo
);
101 int nfs41_name_cache_remove_stale(
102 IN
struct nfs41_name_cache
*cache
,
103 IN nfs41_session
*session
,
104 IN nfs41_abs_path
*path
);
106 #endif /* !__NFS41_DAEMON_NAME_CACHE_H__ */