Skip to content

Commit

Permalink
Merge pull request #283 from liulanzheng/upstream
Browse files Browse the repository at this point in the history
fix mkfs by marking inode 1 inuse
  • Loading branch information
yuchen0cc committed Nov 7, 2023
2 parents bacb344 + 937ef47 commit 6866d75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/overlaybd/extfs/mkfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ int do_mkfs(io_manager manager, size_t size) {
return ret;
}
// reserve inodes
ext2fs_inode_alloc_stats2(fs, EXT2_BAD_INO, +1, 0);
for (ext2_ino_t i = EXT2_ROOT_INO + 1; i < EXT2_FIRST_INODE(fs->super); i++)
ext2fs_inode_alloc_stats2(fs, i, +1, 0);
ext2fs_mark_ib_dirty(fs);
Expand Down

0 comments on commit 6866d75

Please sign in to comment.