Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/tmpfs/tmpfs.h
Show All 39 Lines | |||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/tree.h> | #include <sys/tree.h> | ||||
#ifdef _SYS_MALLOC_H_ | #ifdef _SYS_MALLOC_H_ | ||||
MALLOC_DECLARE(M_TMPFSNAME); | MALLOC_DECLARE(M_TMPFSNAME); | ||||
#endif | #endif | ||||
#define OBJ_TMPFS OBJ_PAGERPRIV /* has tmpfs vnode allocated */ | |||||
/* | /* | ||||
* Internal representation of a tmpfs directory entry. | * Internal representation of a tmpfs directory entry. | ||||
*/ | */ | ||||
LIST_HEAD(tmpfs_dir_duphead, tmpfs_dirent); | LIST_HEAD(tmpfs_dir_duphead, tmpfs_dirent); | ||||
struct tmpfs_dirent { | struct tmpfs_dirent { | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 453 Lines • ▼ Show 20 Lines | |||||
* tmpfs). | * tmpfs). | ||||
*/ | */ | ||||
#if !defined(TMPFS_PAGES_MINRESERVED) | #if !defined(TMPFS_PAGES_MINRESERVED) | ||||
#define TMPFS_PAGES_MINRESERVED (4 * 1024 * 1024 / PAGE_SIZE) | #define TMPFS_PAGES_MINRESERVED (4 * 1024 * 1024 / PAGE_SIZE) | ||||
#endif | #endif | ||||
size_t tmpfs_mem_avail(void); | size_t tmpfs_mem_avail(void); | ||||
size_t tmpfs_pages_used(struct tmpfs_mount *tmp); | size_t tmpfs_pages_used(struct tmpfs_mount *tmp); | ||||
void tmpfs_subr_init(void); | int tmpfs_subr_init(void); | ||||
void tmpfs_subr_uninit(void); | void tmpfs_subr_uninit(void); | ||||
extern int tmpfs_pager_type; | |||||
/* | /* | ||||
* Macros/functions to convert from generic data structures to tmpfs | * Macros/functions to convert from generic data structures to tmpfs | ||||
* specific ones. | * specific ones. | ||||
*/ | */ | ||||
static inline struct tmpfs_mount * | static inline struct tmpfs_mount * | ||||
VFS_TO_TMPFS(struct mount *mp) | VFS_TO_TMPFS(struct mount *mp) | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |