class InodeManager

Defined at line 56 of file ../../src/storage/minfs/allocator/inode_manager.h

InodeManager is responsible for owning the persistent storage for inodes.

It can be used to Load and Update inodes on storage.

Additionally, it is responsible for allocating and freeing inodes.

Public Methods

zx::result<std::unique_ptr<InodeManager>> Create (block_client::BlockDevice * device, SuperblockManager * sb, fs::BufferedOperationsBuilder * builder, AllocatorMetadata metadata, blk_t start_block, size_t inodes)

Defined at line 39 of file ../../src/storage/minfs/allocator/inode_manager.cc

zx::result<std::unique_ptr<InodeManager>> Create (Bcache * bc, SuperblockManager * sb, fs::BufferedOperationsBuilder * builder, AllocatorMetadata metadata, blk_t start_block, size_t inodes)

Defined at line 17 of file ../../src/storage/minfs/allocator/inode_manager_host.cc

zx::result<> Update (PendingWork * transaction, ino_t ino, const Inode * inode)

Persist the inode to storage.

Defined at line 37 of file ../../src/storage/minfs/allocator/inode_manager_host.cc

const Allocator * GetInodeAllocator ()

InspectableInodeManager interface:

Defined at line 56 of file ../../src/storage/minfs/allocator/inode_manager_host.cc

void InodeManager ()

Defined at line 58 of file ../../src/storage/minfs/allocator/inode_manager.h

zx::result<Inode> Load (ino_t ino)

Defined at line 58 of file ../../src/storage/minfs/allocator/inode_manager_host.cc

void InodeManager (const InodeManager & )

Not copyable or movable

Defined at line 60 of file ../../src/storage/minfs/allocator/inode_manager.h

InodeManager & operator= (const InodeManager & )

Defined at line 61 of file ../../src/storage/minfs/allocator/inode_manager.h

void InodeManager (InodeManager && )

Defined at line 62 of file ../../src/storage/minfs/allocator/inode_manager.h

InodeManager & operator= (InodeManager && )

Defined at line 63 of file ../../src/storage/minfs/allocator/inode_manager.h

void ~InodeManager ()

Defined at line 65 of file ../../src/storage/minfs/allocator/inode_manager.h

zx_status_t Grow (size_t inodes)

Extend the number of inodes managed.

It is the caller's responsibility to ensure that there is space

on persistent storage for these inodes to be stored.

Defined at line 71 of file ../../src/storage/minfs/allocator/inode_manager_host.cc

zx::result<> Reserve (PendingWork * transaction, size_t inodes, AllocatorReservation * reservation)

Reserve |inodes| inodes in the allocator.

Defined at line 81 of file ../../src/storage/minfs/allocator/inode_manager.h

void Free (Transaction * transaction, size_t index)

Free an inode.

Defined at line 87 of file ../../src/storage/minfs/allocator/inode_manager.h

bool CheckAllocated (uint32_t inode_num)

Defined at line 99 of file ../../src/storage/minfs/allocator/inode_manager.h

Allocator & inode_allocator ()

Defined at line 109 of file ../../src/storage/minfs/allocator/inode_manager.h