diff --git a/utils/src/format.h b/utils/src/format.h index b5ced5d4..936b0717 100644 --- a/utils/src/format.h +++ b/utils/src/format.h @@ -443,8 +443,12 @@ struct scoutfs_quorum_block { __le64 unmount_barrier; __le32 crc; __u8 vote_slot; + __u8 flags; } __packed; +#define SCOUTFS_QUORUM_BLOCK_FLAG_ELECTED (1 << 0) +#define SCOUTFS_QUORUM_BLOCK_FLAGS_UNKNOWN (U8_MAX << 1) + #define SCOUTFS_QUORUM_MAX_SLOTS SCOUTFS_QUORUM_BLOCKS /* diff --git a/utils/src/print.c b/utils/src/print.c index 7f55c648..161c7f33 100644 --- a/utils/src/print.c +++ b/utils/src/print.c @@ -497,7 +497,7 @@ static int print_quorum_blocks(int fd, struct scoutfs_super_block *super) printf("quorum block blkno %llu\n" " fsid %llx blkno %llu config_gen %llu crc 0x%08x\n" " write_nr %llu elected_nr %llu " - "unmount_barrier %llu vote_slot %u\n", + "unmount_barrier %llu vote_slot %u flags %02x\n", blkno, le64_to_cpu(blk->fsid), le64_to_cpu(blk->blkno), le64_to_cpu(blk->config_gen), @@ -505,7 +505,7 @@ static int print_quorum_blocks(int fd, struct scoutfs_super_block *super) le64_to_cpu(blk->write_nr), le64_to_cpu(blk->elected_nr), le64_to_cpu(blk->unmount_barrier), - blk->vote_slot); + blk->vote_slot, blk->flags); } free(blk);