netatalk
4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Toggle main menu visibility
Loading...
Searching...
No Matches
ad_cache.h
Go to the documentation of this file.
1
#ifndef AD_CACHE_H
2
#define AD_CACHE_H
3
4
#include <stdbool.h>
5
#include <sys/stat.h>
6
7
#include <
atalk/adouble.h
>
8
#include <
atalk/directory.h
>
9
#include <
atalk/volume.h
>
10
11
extern
void
ad_store_to_cache
(
struct
adouble
*adp,
struct
dir
*cached);
12
extern
void
ad_rebuild_from_cache
(
struct
adouble
*adp,
13
const
struct
dir
*cached);
14
extern
int
ad_metadata_cached
(
const
char
*name,
int
flags
,
struct
adouble
*adp,
15
const
struct
vol
*
vol
,
struct
dir
*
dir
,
16
bool
strict,
struct
stat *recent_st);
17
18
/* AD cache statistics — defined in ad_cache.c, logged by dircache.c */
19
extern
unsigned
long
long
ad_cache_hits
;
20
extern
unsigned
long
long
ad_cache_misses
;
21
extern
unsigned
long
long
ad_cache_no_ad
;
22
23
/* Tier 2: Resource Fork data cache helpers — defined in ad_cache.c */
24
extern
int
rfork_cache_store_from_fd
(
struct
dir
*
entry
,
25
struct
adouble
*adp,
int
eid);
26
extern
void
rfork_cache_free
(
struct
dir
*
entry
);
27
extern
void
rfork_cache_evict_to_budget
(
size_t
needed);
28
29
#endif
/* AD_CACHE_H */
ad_cache_hits
unsigned long long ad_cache_hits
Definition
ad_cache.c:39
ad_cache_no_ad
unsigned long long ad_cache_no_ad
Definition
ad_cache.c:41
ad_cache_misses
unsigned long long ad_cache_misses
Definition
ad_cache.c:40
rfork_cache_store_from_fd
int rfork_cache_store_from_fd(struct dir *entry, struct adouble *adp, int eid)
Store resource fork data by reading directly from the ad fd.
Definition
ad_cache.c:368
rfork_cache_free
void rfork_cache_free(struct dir *entry)
Free a single entry's rfork buffer, remove from rfork LRU, update counter.
Definition
ad_cache.c:274
ad_store_to_cache
void ad_store_to_cache(struct adouble *adp, struct dir *cached)
Store AD metadata results into struct dir cache fields.
Definition
ad_cache.c:55
rfork_cache_evict_to_budget
void rfork_cache_evict_to_budget(size_t needed)
Evict rfork buffers from rfork LRU head (oldest/LRU) until under budget.
Definition
ad_cache.c:339
ad_metadata_cached
int ad_metadata_cached(const char *name, int flags, struct adouble *adp, const struct vol *vol, struct dir *dir, bool strict, struct stat *recent_st)
Unified AD metadata access with integrated cache management.
Definition
ad_cache.c:142
ad_rebuild_from_cache
void ad_rebuild_from_cache(struct adouble *adp, const struct dir *cached)
Populate struct adouble from struct dir cache fields.
Definition
ad_cache.c:98
adouble.h
Part of Netatalk's AppleDouble implementatation.
flags
static dbd_flags_t flags
Definition
cmd_dbd.c:43
directory.h
volume.h
adouble
Definition
adouble.h:191
dir
Definition
include/atalk/directory.h:56
entry
Definition
ad_open.c:95
vol
Definition
include/atalk/volume.h:33
etc
afpd
ad_cache.h
Generated by
1.17.0