public INode AllocateINode(UInt32 flags, UInt32 owner)
{
// 查找位图,寻找一个可用的 index
UInt32 freeIndex = GetFreeINodeIndex();
if (freeIndex == UInt32.MaxValue)
{
throw new Exception("inode 数量已满");
}
// 创建
INode inode = INode.Create(this, freeIndex, flags, owner);
// 置位
SetBitmapAllocated(superBlock.pInodeBitVectors, inodeBitmaps, freeIndex);
// 更新计数器
superBlock.data.inodeAllocated++;
superBlock.Save();
return inode;
}