class FileCache

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

Public Methods

void FileCache (VnodeF2fs * vnode, VmoManager * vmo_manager)

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

void ~FileCache ()

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

void FileCache ()

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

void FileCache (const FileCache & )

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

FileCache & operator= (const FileCache & )

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

void FileCache (const FileCache && )

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

FileCache & operator= (const FileCache && )

Defined at line 304 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 327 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 298 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 309 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 304 of file ../../src/storage/f2fs/file_cache.cc

VnodeF2fs & GetVnode ()

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

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 337 of file ../../src/storage/f2fs/file_cache.cc

VmoManager & GetVmoManager ()

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

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 435 of file ../../src/storage/f2fs/file_cache.cc

void Reset ()

It invalidates all Pages from |page_tree_|.

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

void ClearDirtyPages ()

Clear all dirty pages.

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

void Downgrade (Page * raw_page)

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

Defined at line 244 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 472 of file ../../src/storage/f2fs/file_cache.cc

F2fs * fs ()

Defined at line 254 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 493 of file ../../src/storage/f2fs/file_cache.cc

void EvictCleanPages ()

It evicts every clean, inactive page.

Defined at line 544 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 558 of file ../../src/storage/f2fs/file_cache.cc

void NotifyWriteback (PageList pages)

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

size_t GetSize ()

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