mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-31 21:31:34 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user