class InodeManager
Defined at line 46 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 22 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
void Update (PendingWork * transaction, ino_t ino, const Inode * inode)
Persist the inode to storage.
Defined at line 36 of file ../../src/storage/minfs/allocator/inode_manager_host.cc
void InodeManager ()
Defined at line 48 of file ../../src/storage/minfs/allocator/inode_manager.h
void InodeManager (const InodeManager & )
Not copyable or movable
Defined at line 50 of file ../../src/storage/minfs/allocator/inode_manager.h
InodeManager & operator= (const InodeManager & )
Defined at line 51 of file ../../src/storage/minfs/allocator/inode_manager.h
const Allocator * GetInodeAllocator ()
InspectableInodeManager interface:
Defined at line 51 of file ../../src/storage/minfs/allocator/inode_manager_host.cc
void InodeManager (InodeManager && )
Defined at line 52 of file ../../src/storage/minfs/allocator/inode_manager.h
InodeManager & operator= (InodeManager && )
Defined at line 53 of file ../../src/storage/minfs/allocator/inode_manager.h
void Load (ino_t ino, Inode * out)
Defined at line 53 of file ../../src/storage/minfs/allocator/inode_manager_host.cc
void ~InodeManager ()
Defined at line 55 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 63 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 71 of file ../../src/storage/minfs/allocator/inode_manager.h
void Free (Transaction * transaction, size_t index)
Free an inode.
Defined at line 77 of file ../../src/storage/minfs/allocator/inode_manager.h
bool CheckAllocated (uint32_t inode_num)
Defined at line 89 of file ../../src/storage/minfs/allocator/inode_manager.h
Allocator & inode_allocator ()
Defined at line 99 of file ../../src/storage/minfs/allocator/inode_manager.h