template <typename T, bool EnableAdoptionValidator = ZX_DEBUG_ASSERT_IMPLEMENTED>

class VnodeRefCounted

Defined at line 24 of file ../../src/storage/lib/vfs/cpp/ref_counted.h

VnodeRefCounted implements a customized RefCounted object.

It adds an additional method, "ResurrectRef", which allows Vnodes to be re-used after a reference

count of zero has been reached.

Public Methods

void VnodeRefCounted<T, EnableAdoptionValidator> (const VnodeRefCounted<T, EnableAdoptionValidator> & )

VnodeRefCounted

<

> instances may not be copied, assigned or moved.

Defined at line 37 of file ../../src/storage/lib/vfs/cpp/ref_counted.h

void VnodeRefCounted<T, EnableAdoptionValidator> (VnodeRefCounted<T, EnableAdoptionValidator> && )

VnodeRefCounted

<

> instances may not be copied, assigned or moved.

Defined at line 37 of file ../../src/storage/lib/vfs/cpp/ref_counted.h

VnodeRefCounted<T, EnableAdoptionValidator> & operator= (const VnodeRefCounted<T, EnableAdoptionValidator> & )

VnodeRefCounted

<

> instances may not be copied, assigned or moved.

Defined at line 37 of file ../../src/storage/lib/vfs/cpp/ref_counted.h

VnodeRefCounted<T, EnableAdoptionValidator> & operator= (VnodeRefCounted<T, EnableAdoptionValidator> && )

VnodeRefCounted

<

> instances may not be copied, assigned or moved.

Defined at line 37 of file ../../src/storage/lib/vfs/cpp/ref_counted.h

void ResurrectRef ()

This method should only be called if the refcount was "zero", implying the object is currently

executing fbl_recycle. In this case, the refcount is increased by one.

This method may be called to prevent fbl_recycle from following the typical path of object

deletion: instead of destroying the object, this function can be called to "reset" the

lifecycle of the RefCounted object to the initialized state of "ref_count_ = 1", so it can

continue to be utilized after there are no strong references.

This function should be used EXCLUSIVELY from within fbl_recycle. If other clients (outside

fbl_recycle) attempt to resurrect the Vnode concurrently with a call to Vnode::fbl_recycle,

they risk going through the entire Vnode lifecycle and destroying it (with another call to

Vnode::fbl_recycle) before the initial recycle execution terminates.

Defined at line 51 of file ../../src/storage/lib/vfs/cpp/ref_counted.h

Protected Methods

void VnodeRefCounted<T, EnableAdoptionValidator> ()

Defined at line 60 of file ../../src/storage/lib/vfs/cpp/ref_counted.h

void ~VnodeRefCounted<T, EnableAdoptionValidator> ()

Defined at line 61 of file ../../src/storage/lib/vfs/cpp/ref_counted.h