class VnodeCache

Defined at line 17 of file ../../src/storage/f2fs/vnode_cache.h

Public Methods

void VnodeCache ()

Defined at line 12 of file ../../src/storage/f2fs/vnode_cache.cc

void ~VnodeCache ()

Defined at line 14 of file ../../src/storage/f2fs/vnode_cache.cc

void VnodeCache (const VnodeCache & )

Defined at line 19 of file ../../src/storage/f2fs/vnode_cache.h

void VnodeCache (VnodeCache && )

Defined at line 19 of file ../../src/storage/f2fs/vnode_cache.h

VnodeCache & operator= (const VnodeCache & )

Defined at line 19 of file ../../src/storage/f2fs/vnode_cache.h

VnodeCache & operator= (VnodeCache && )

Defined at line 19 of file ../../src/storage/f2fs/vnode_cache.h

zx_status_t Lookup (const ino_t & ino, fbl::RefPtr<VnodeF2fs> * out)

It checks if there is vnode for |ino| in vnode_table_, and

it returns ZX_OK with valid |out| if it find it.

Otherwise, it returns ZX_ERR_NOT_FOUND.

When a caller tries to look up a vnode that is being recyclyed,

it will be blocked until it gets inactive (deactivated) and

valid ref_count.

Defined at line 92 of file ../../src/storage/f2fs/vnode_cache.cc

zx_status_t Evict (VnodeF2fs * vnode)

It tries to evict |vnode| from vnode_table_.

It returns ZX_ERR_NOT_FOUND if it cannot find |vnode| in the table.

A caller should ensure that |vnode| does not exist in dirty_list_.

Defined at line 112 of file ../../src/storage/f2fs/vnode_cache.cc

zx_status_t EvictUnsafe (VnodeF2fs * vnode)

Defined at line 118 of file ../../src/storage/f2fs/vnode_cache.cc

zx_status_t Add (VnodeF2fs * vnode)

It tries to add |vnode| to vnode_table_.

It returns ZX_ERR_ALREADY_EXISTS if it is already in the table.

Defined at line 128 of file ../../src/storage/f2fs/vnode_cache.cc

zx_status_t AddDirty (VnodeF2fs & vnode)

It tries to add |vnode| to vnode_list_.

It returns ZX_ERR_ALREADY_EXISTS if |vnode| is already in the list.

Defined at line 137 of file ../../src/storage/f2fs/vnode_cache.cc

bool IsDirty (VnodeF2fs & vnode)

Defined at line 151 of file ../../src/storage/f2fs/vnode_cache.cc

zx_status_t RemoveDirty (VnodeF2fs * vnode)

It tries to remove |vnode| from dirty_list_.

Defined at line 159 of file ../../src/storage/f2fs/vnode_cache.cc

zx_status_t RemoveDirtyUnsafe (VnodeF2fs * vnode)

Defined at line 164 of file ../../src/storage/f2fs/vnode_cache.cc

void Reset ()

Defined at line 16 of file ../../src/storage/f2fs/vnode_cache.cc

zx_status_t ForDirtyVnodesIf (VnodeCallback cb, VnodeCallback cb_if)

It traverses dirty_lists and executes cb for the dirty vnodes with

which cb_if returns ZX_OK.

Defined at line 65 of file ../../src/storage/f2fs/vnode_cache.cc

zx_status_t ForAllVnodes (VnodeCallback callback)

It traverses vnode_tables and execute cb with every vnode.

Defined at line 28 of file ../../src/storage/f2fs/vnode_cache.cc

bool IsDirtyListEmpty ()

Defined at line 62 of file ../../src/storage/f2fs/vnode_cache.h

void Shrink ()

It evicts all inactive vnodes and resets the cache of active vnodes.

Defined at line 176 of file ../../src/storage/f2fs/vnode_cache.cc