MOS Source Code
|
#include "mos/filesystem/page_cache.h"
#include "mos/filesystem/vfs_types.h"
#include "mos/filesystem/vfs_utils.h"
#include "mos/mm/mm.h"
#include "mos/mm/mmstat.h"
#include "mos/mm/physical/pmm.h"
#include "mos/syslog/printk.h"
#include <mos/mos_global.h>
#include <mos_stdlib.h>
#include <mos_string.h>
Go to the source code of this file.
Classes | |
struct | _flush_and_drop_data |
Functions | |
static bool | do_flush_and_drop_cached_page (const uintn key, void *value, void *data) |
long | pagecache_flush_or_drop (inode_cache_t *icache, off_t pgoff, size_t npages, bool drop_page) |
Flush or drop a range of pages from the page cache. | |
long | pagecache_flush_or_drop_all (inode_cache_t *icache, bool drop_page) |
Flush or drop all pages in the page cache. | |
phyframe_t * | pagecache_get_page_for_read (inode_cache_t *cache, off_t pgoff) |
Get a page from the page cache. | |
phyframe_t * | pagecache_get_page_for_write (inode_cache_t *cache, off_t pgoff) |
Get a page from the page cache for writing. | |
ssize_t | vfs_read_pagecache (inode_cache_t *icache, void *buf, size_t size, off_t offset) |
ssize_t | vfs_write_pagecache (inode_cache_t *icache, const void *buf, size_t total_size, off_t offset) |
Definition at line 23 of file page_cache.c.
Referenced by pagecache_flush_or_drop(), and pagecache_flush_or_drop_all().
long pagecache_flush_or_drop | ( | inode_cache_t * | icache, |
off_t | pgoff, | ||
size_t | npages, | ||
bool | drop_page ) |
Flush or drop a range of pages from the page cache.
icache | The inode cache |
pgoff | The starting page offset |
npages | The number of pages to flush or drop |
drop_page | Whether to drop the pages, or just flush them |
Definition at line 56 of file page_cache.c.
Referenced by do_pagecache_flush().
long pagecache_flush_or_drop_all | ( | inode_cache_t * | icache, |
bool | drop_page ) |
Flush or drop all pages in the page cache.
icache | The inode cache |
drop_page | Whether to drop the pages, or just flush them |
Definition at line 78 of file page_cache.c.
Referenced by do_pagecache_flush(), and inode_try_drop().
phyframe_t * pagecache_get_page_for_read | ( | inode_cache_t * | cache, |
off_t | pgoff ) |
Get a page from the page cache.
cache | The inode cache |
pgoff | The page offset |
Definition at line 85 of file page_cache.c.
Referenced by pagecache_get_page_for_write(), vfs_fault_handler(), and vfs_read_pagecache().
phyframe_t * pagecache_get_page_for_write | ( | inode_cache_t * | cache, |
off_t | pgoff ) |
Get a page from the page cache for writing.
cache | The inode cache |
pgoff | The page offset |
Definition at line 103 of file page_cache.c.
Referenced by simple_page_write_begin().
ssize_t vfs_read_pagecache | ( | inode_cache_t * | icache, |
void * | buf, | ||
size_t | size, | ||
off_t | offset ) |
Definition at line 108 of file page_cache.c.
Referenced by vfs_generic_read().
ssize_t vfs_write_pagecache | ( | inode_cache_t * | icache, |
const void * | buf, | ||
size_t | total_size, | ||
off_t | offset ) |
Definition at line 137 of file page_cache.c.
Referenced by vfs_generic_write().