From ea7c41d876b8295c957c47ff7be4a514118e636e Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 26 Oct 2020 10:51:06 -0700 Subject: [PATCH] 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 --- utils/src/format.h | 2 -- utils/src/mkfs.c | 4 ---- utils/src/print.c | 6 ++---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/utils/src/format.h b/utils/src/format.h index 800d9fab..34ebed1a 100644 --- a/utils/src/format.h +++ b/utils/src/format.h @@ -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; diff --git a/utils/src/mkfs.c b/utils/src/mkfs.c index b03b33d5..b3225cab 100644 --- a/utils/src/mkfs.c +++ b/utils/src/mkfs.c @@ -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, diff --git a/utils/src/print.c b/utils/src/print.c index 92a93049..c8009cd0 100644 --- a/utils/src/print.c +++ b/utils/src/print.c @@ -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),