class FileCache

Defined at line 302 of file ../../src/storage/f2fs/file_cache.h

Public Methods

void FileCache (VnodeF2fs * vnode, VmoManager * vmo_manager)

Defined at line 249 of file ../../src/storage/f2fs/file_cache.cc

void ~FileCache ()

Defined at line 252 of file ../../src/storage/f2fs/file_cache.cc

fbl::RefPtr<VnodeF2fs> GetVnodeRefPtr ()

Defined at line 262 of file ../../src/storage/f2fs/file_cache.cc

void Downgrade (Page * raw_page)

Only Page::RecyclePage() is allowed to call it.

Defined at line 278 of file ../../src/storage/f2fs/file_cache.cc

F2fs * fs ()

Defined at line 294 of file ../../src/storage/f2fs/file_cache.cc

void FileCache ()

Defined at line 305 of file ../../src/storage/f2fs/file_cache.h

void FileCache (const FileCache & )

Defined at line 306 of file ../../src/storage/f2fs/file_cache.h

FileCache & operator= (const FileCache & )

Defined at line 307 of file ../../src/storage/f2fs/file_cache.h

void FileCache (const FileCache && )

Defined at line 308 of file ../../src/storage/f2fs/file_cache.h

FileCache & operator= (const FileCache && )

Defined at line 309 of file ../../src/storage/f2fs/file_cache.h

VnodeF2fs & GetVnode ()

Defined at line 338 of file ../../src/storage/f2fs/file_cache.h

VmoManager & GetVmoManager ()

Defined at line 347 of file ../../src/storage/f2fs/file_cache.h

zx_status_t GetLockedPage (pgoff_t index, LockedPage * out)

It returns a locked Page corresponding to |index| from |page_tree_|.

If there is no Page, it creates and returns a locked Page.

Defined at line 367 of file ../../src/storage/f2fs/file_cache.cc

zx::result<std::vector<LockedPage>> GetLockedPages (pgoff_t start, pgoff_t end)

It returns locked Pages corresponding to [start - end) from |page_tree_|.

Defined at line 338 of file ../../src/storage/f2fs/file_cache.cc

zx::result<std::vector<fbl::RefPtr<Page>>> GetPages (const pgoff_t start, const pgoff_t end)

It does the same thing as the above methods except that it returns unlocked Pages.

Defined at line 349 of file ../../src/storage/f2fs/file_cache.cc

std::vector<LockedPage> FindLockedPages (pgoff_t start, pgoff_t end)

It returns locked Pages corresponding to [start - end) from |page_tree_|.

If there is no corresponding Page, the returned page will be a null page.

Defined at line 344 of file ../../src/storage/f2fs/file_cache.cc

zx_status_t FindPage (pgoff_t index, fbl::RefPtr<Page> * out)

It returns an unlocked Page corresponding to |index| from |page_tree|.

If it fails to find the Page in |page_tree_|, it returns ZX_ERR_NOT_FOUND.

Defined at line 377 of file ../../src/storage/f2fs/file_cache.cc

std::vector<LockedPage> InvalidatePages (pgoff_t start, pgoff_t end, bool zero)

It invalidates Pages within the range of |start| to |end| in |page_tree_|. If |zero| is set,

the data of the corresponding pages are zeored. Then, it evicts all Pages within the range and

returns them locked.

Defined at line 475 of file ../../src/storage/f2fs/file_cache.cc

void Reset ()

It invalidates all Pages from |page_tree_|.

Defined at line 507 of file ../../src/storage/f2fs/file_cache.cc

void ClearDirtyPages ()

Clear all dirty pages.

Defined at line 493 of file ../../src/storage/f2fs/file_cache.cc

size_t GetReadHint (pgoff_t start, size_t size, size_t max_size, bool high_memory_pressure)

It returns a proper read size within the range of [size, size + max_size) according to the

status of recently used pages and memory pressure level.

Defined at line 512 of file ../../src/storage/f2fs/file_cache.cc

std::vector<fbl::RefPtr<Page>> FindDirtyPages (const WritebackOperation & operation)

It returns a set of dirty Pages that meet |operation|.

Defined at line 533 of file ../../src/storage/f2fs/file_cache.cc

void EvictCleanPages ()

It evicts every clean, inactive page.

Defined at line 584 of file ../../src/storage/f2fs/file_cache.cc

void WaitOnWriteback (Page & page)

It provides wait() and notify() for kPageWriteback flag of Page.

Defined at line 598 of file ../../src/storage/f2fs/file_cache.cc

void NotifyWriteback (PageList pages)

Defined at line 606 of file ../../src/storage/f2fs/file_cache.cc

size_t GetSize ()

Defined at line 615 of file ../../src/storage/f2fs/file_cache.cc