Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/tmpfs/tmpfs_subr.c
Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | sysctl_mem_reserved(SYSCTL_HANDLER_ARGS) | ||||
pages = bytes / PAGE_SIZE; | pages = bytes / PAGE_SIZE; | ||||
if (pages < TMPFS_PAGES_MINRESERVED) | if (pages < TMPFS_PAGES_MINRESERVED) | ||||
return (EINVAL); | return (EINVAL); | ||||
*(long *)arg1 = pages; | *(long *)arg1 = pages; | ||||
return (0); | return (0); | ||||
} | } | ||||
SYSCTL_PROC(_vfs_tmpfs, OID_AUTO, memory_reserved, CTLTYPE_LONG|CTLFLAG_RW, | SYSCTL_PROC(_vfs_tmpfs, OID_AUTO, memory_reserved, | ||||
CTLTYPE_LONG | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | |||||
&tmpfs_pages_reserved, 0, sysctl_mem_reserved, "L", | &tmpfs_pages_reserved, 0, sysctl_mem_reserved, "L", | ||||
"Amount of available memory and swap below which tmpfs growth stops"); | "Amount of available memory and swap below which tmpfs growth stops"); | ||||
static __inline int tmpfs_dirtree_cmp(struct tmpfs_dirent *a, | static __inline int tmpfs_dirtree_cmp(struct tmpfs_dirent *a, | ||||
struct tmpfs_dirent *b); | struct tmpfs_dirent *b); | ||||
RB_PROTOTYPE_STATIC(tmpfs_dir, tmpfs_dirent, uh.td_entries, tmpfs_dirtree_cmp); | RB_PROTOTYPE_STATIC(tmpfs_dir, tmpfs_dirent, uh.td_entries, tmpfs_dirtree_cmp); | ||||
size_t | size_t | ||||
▲ Show 20 Lines • Show All 1,764 Lines • Show Last 20 Lines |