class VmoManager

Defined at line 97 of file ../../src/storage/f2fs/vmo_manager.h

It provides vmo service to Filecache of a vnode.

When the cache is backed with discardable VMO, it divides the range of a vnode into a fixed size

of vmo nodes and keeps them in |vmo_tree_|. From this way, it covers the full range of a vnode

and saves va mapping resource. A vmo node represents a range between VmoMapping::index_ and

VmoMapping::index_ + VmoMapping::size_in_blocks within the range of a vnode. The size of a vmo

node is set to VmoManager::node_size_in_blocks_, and the va mapping of a vmo node keeps as long

as the vmo node is kept in |vmo_tree_|.

When the cache is backed with paged VMO, it does not use the tree and manages its content and vmo

sizes.

Public Methods

void VmoManager ()

Defined at line 99 of file ../../src/storage/f2fs/vmo_manager.h

void VmoManager (VmoMode mode, size_t content_size, size_t node_size, zx::vmo vmo)

Defined at line 100 of file ../../src/storage/f2fs/vmo_manager.cc

void VmoManager (const VmoManager & )

Defined at line 101 of file ../../src/storage/f2fs/vmo_manager.h

VmoManager & operator= (const VmoManager & )

Defined at line 102 of file ../../src/storage/f2fs/vmo_manager.h

void VmoManager (const VmoManager && )

Defined at line 103 of file ../../src/storage/f2fs/vmo_manager.h

VmoManager & operator= (const VmoManager && )

Defined at line 104 of file ../../src/storage/f2fs/vmo_manager.h

void ~VmoManager ()

Defined at line 105 of file ../../src/storage/f2fs/vmo_manager.h

zx::result<bool> CreateAndLockVmo (pgoff_t index, void ** out)

Defined at line 121 of file ../../src/storage/f2fs/vmo_manager.cc

bool IsPaged ()

Defined at line 130 of file ../../src/storage/f2fs/vmo_manager.h

zx_status_t UnlockVmo (pgoff_t index)

Defined at line 141 of file ../../src/storage/f2fs/vmo_manager.cc

void ZeroBlocks (fs::PagedVfs & vfs, pgoff_t start, pgoff_t end)

Defined at line 194 of file ../../src/storage/f2fs/vmo_manager.cc

zx::result<> WritebackBegin (fs::PagedVfs & vfs, const size_t start, const size_t end)

Defined at line 225 of file ../../src/storage/f2fs/vmo_manager.cc

zx_status_t WritebackEnd (fs::PagedVfs & vfs, const size_t start, const size_t end)

Defined at line 245 of file ../../src/storage/f2fs/vmo_manager.cc

zx::result<> DirtyPages (fs::PagedVfs & vfs, const size_t start, const size_t end)

Defined at line 253 of file ../../src/storage/f2fs/vmo_manager.cc

void AllowEviction (fs::PagedVfs & vfs, const size_t start, const size_t end)

Defined at line 327 of file ../../src/storage/f2fs/vmo_manager.cc

zx_status_t Write (const void * data, uint64_t offset, size_t len)

Defined at line 347 of file ../../src/storage/f2fs/vmo_manager.cc

zx_status_t Read (void * data, uint64_t offset, size_t len)

Defined at line 339 of file ../../src/storage/f2fs/vmo_manager.cc

void UpdateSizeUnsafe ()

Defined at line 318 of file ../../src/storage/f2fs/vmo_manager.cc

void SetContentSize (const size_t nbytes)

Defined at line 279 of file ../../src/storage/f2fs/vmo_manager.cc

uint64_t GetContentSize (bool update_checkpointed_size, bool round_up)

Defined at line 308 of file ../../src/storage/f2fs/vmo_manager.cc

uint64_t GetContentSizeUnsafe (bool round_up)

Defined at line 298 of file ../../src/storage/f2fs/vmo_manager.cc

bool SizeIsChanged ()

Defined at line 274 of file ../../src/storage/f2fs/vmo_manager.cc

void Reset (bool shutdown)

Defined at line 156 of file ../../src/storage/f2fs/vmo_manager.cc