netatalk  4.6.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
pfd_cache.h File Reference
#include <sys/stat.h>
#include <atalk/directory.h>
#include "volume.h"

Go to the source code of this file.

Data Structures

struct  pfd_stats

Macros

#define PFD_REGROUND_INTERVAL   256

Functions

int pfd_ostat (const struct vol *vol, struct dir *entry, struct stat *st, int options)
 ostat(cfrombstr(entry->d_fullpath), st, options), accelerated.
void pfd_purge (uint16_t vid, cnid_t did)
void pfd_purge_vol (uint16_t vid)
void pfd_shutdown (void)
void pfd_log_stats (void)
void pfd_stats_get (struct pfd_stats *out)

Macro Definition Documentation

◆ PFD_REGROUND_INTERVAL

#define PFD_REGROUND_INTERVAL   256

Function Documentation

◆ pfd_log_stats()

void pfd_log_stats ( void )
extern

◆ pfd_ostat()

int pfd_ostat ( const struct vol * vol,
struct dir * entry,
struct stat * st,
int options )
extern

ostat(cfrombstr(entry->d_fullpath), st, options), accelerated.

Resolves entry's parent to a cached dir fd and fstatat()s the leaf name; any impediment (no parent entry, ghost parent, open failure) falls back to the full-path ostat internally. Callers cannot observe which path ran: return value and errno are exactly what ostat would produce.

On success the entry's d_fullpath is additionally repaired against the parent's — the relative stat can outlive a rename the path string hasn't caught up with (see pfd_repair_path).

◆ pfd_purge()

void pfd_purge ( uint16_t vid,
cnid_t did )
extern

◆ pfd_purge_vol()

void pfd_purge_vol ( uint16_t vid)
extern

◆ pfd_shutdown()

void pfd_shutdown ( void )
extern

◆ pfd_stats_get()

void pfd_stats_get ( struct pfd_stats * out)
extern