scoutfs-utils: remove free_*_blocks super fields

The kernel is no longer storing the total free space in all allocators
in super block fields.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2020-10-26 15:19:41 -07:00
committed by Zach Brown
parent 669e7f733b
commit ea7c41d876
3 changed files with 2 additions and 10 deletions
-2
View File
@@ -595,11 +595,9 @@ struct scoutfs_super_block {
__le64 total_meta_blocks; /* both static and dynamic */
__le64 first_meta_blkno; /* first dynamically allocated */
__le64 last_meta_blkno;
__le64 free_meta_blocks;
__le64 total_data_blocks;
__le64 first_data_blkno;
__le64 last_data_blkno;
__le64 free_data_blocks;
__le64 quorum_fenced_term;
__le64 quorum_server_term;
__le64 unmount_barrier;
-4
View File
@@ -321,10 +321,6 @@ static int write_new_fs(char *path, int fd, u8 quorum_count, u64 dev_blocks)
}
}
/* fill out allocator fields now that we've written our blocks */
super->free_meta_blocks = cpu_to_le64(last_meta - next_meta + 1);
super->free_data_blocks = cpu_to_le64(last_data - first_data + 1);
/* write the super block */
super->hdr.seq = cpu_to_le64(1);
ret = write_block(fd, SCOUTFS_SUPER_BLKNO, SCOUTFS_BLOCK_SM_SHIFT,
+2 -4
View File
@@ -883,8 +883,8 @@ static void print_super_block(struct scoutfs_super_block *super, u64 blkno)
/* XXX these are all in a crazy order */
printf(" next_ino %llu next_trans_seq %llu\n"
" total_meta_blocks %llu first_meta_blkno %llu last_meta_blkno %llu free_meta_blocks %llu\n"
" total_data_blocks %llu first_data_blkno %llu last_data_blkno %llu free_data_blocks %llu\n"
" total_meta_blocks %llu first_meta_blkno %llu last_meta_blkno %llu\n"
" total_data_blocks %llu first_data_blkno %llu last_data_blkno %llu\n"
" quorum_fenced_term %llu quorum_server_term %llu unmount_barrier %llu\n"
" quorum_count %u server_addr %s\n"
" meta_alloc[0]: "ALCROOT_F"\n"
@@ -904,11 +904,9 @@ static void print_super_block(struct scoutfs_super_block *super, u64 blkno)
le64_to_cpu(super->total_meta_blocks),
le64_to_cpu(super->first_meta_blkno),
le64_to_cpu(super->last_meta_blkno),
le64_to_cpu(super->free_meta_blocks),
le64_to_cpu(super->total_data_blocks),
le64_to_cpu(super->first_data_blkno),
le64_to_cpu(super->last_data_blkno),
le64_to_cpu(super->free_data_blocks),
le64_to_cpu(super->quorum_fenced_term),
le64_to_cpu(super->quorum_server_term),
le64_to_cpu(super->unmount_barrier),