scoutfs-utils: update format for greeting node_id

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2018-08-28 15:34:33 -07:00
committed by Zach Brown
parent 7abf5c1e2b
commit 078d2f6073
3 changed files with 5 additions and 0 deletions
+2
View File
@@ -368,6 +368,7 @@ struct scoutfs_super_block {
__le64 alloc_cursor;
struct scoutfs_btree_ring bring;
__le64 next_seg_seq;
__le64 next_node_id;
struct scoutfs_btree_root alloc_root;
struct scoutfs_manifest manifest;
struct scoutfs_inet_addr server_addr;
@@ -514,6 +515,7 @@ struct scoutfs_lock_name {
struct scoutfs_net_greeting {
__le64 fsid;
__le64 format_hash;
__le64 node_id;
} __packed;
/*
+1
View File
@@ -226,6 +226,7 @@ static int write_new_fs(char *path, int fd)
super->next_seq = cpu_to_le64(1);
super->total_blocks = cpu_to_le64(total_blocks);
super->next_seg_seq = cpu_to_le64(2);
super->next_node_id = cpu_to_le64(1);
/* align the btree ring to the segment after the super */
blkno = round_up(SCOUTFS_SUPER_BLKNO + 1, SCOUTFS_SEGMENT_BLOCKS);
+2
View File
@@ -457,6 +457,7 @@ 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_seq %llu next_seg_seq %llu\n"
" next_node_id %llu\n"
" total_blocks %llu free_blocks %llu alloc_cursor %llu\n"
" btree ring: first_blkno %llu nr_blocks %llu next_block %llu "
"next_seq %llu\n"
@@ -465,6 +466,7 @@ static void print_super_block(struct scoutfs_super_block *super, u64 blkno)
le64_to_cpu(super->next_ino),
le64_to_cpu(super->next_seq),
le64_to_cpu(super->next_seg_seq),
le64_to_cpu(super->next_node_id),
le64_to_cpu(super->total_blocks),
le64_to_cpu(super->free_blocks),
le64_to_cpu(super->alloc_cursor),