mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-05 11:45:09 +00:00
Update for next_ino in super block
Add support for storing the next allocated inode in the super block. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -149,6 +149,7 @@ struct scoutfs_super_block {
|
||||
struct scoutfs_block_header hdr;
|
||||
__le64 id;
|
||||
__u8 uuid[SCOUTFS_UUID_BYTES];
|
||||
__le64 next_ino;
|
||||
__le64 total_blocks;
|
||||
__le32 buddy_blocks;
|
||||
__le32 buddy_sweep_bit;
|
||||
|
||||
@@ -114,6 +114,7 @@ static int write_new_fs(char *path, int fd)
|
||||
super->hdr.seq = cpu_to_le64(1);
|
||||
super->id = cpu_to_le64(SCOUTFS_SUPER_ID);
|
||||
uuid_generate(super->uuid);
|
||||
super->next_ino = cpu_to_le64(SCOUTFS_ROOT_INO + 1);
|
||||
super->total_blocks = cpu_to_le64(total_blocks);
|
||||
super->buddy_blocks = cpu_to_le32(buddy_blocks);
|
||||
|
||||
|
||||
@@ -241,8 +241,10 @@ static int print_super_blocks(int fd)
|
||||
print_block_header(&super->hdr);
|
||||
printf(" id %llx uuid %s\n",
|
||||
le64_to_cpu(super->id), uuid_str);
|
||||
printf(" total_blocks %llu buddy_blocks %u buddy_sweep_bit %u\n"
|
||||
printf(" next_ino %llu total_blocks %llu buddy_blocks %u "
|
||||
"buddy_sweep_bit %u\n"
|
||||
" buddy_head %llu buddy_tail %llu\n",
|
||||
le64_to_cpu(super->next_ino),
|
||||
le64_to_cpu(super->total_blocks),
|
||||
le32_to_cpu(super->buddy_blocks),
|
||||
le32_to_cpu(super->buddy_sweep_bit),
|
||||
|
||||
Reference in New Issue
Block a user