mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-07 20:45:18 +00:00
scoutfs-utils: add flags to quorum block
Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -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
|
||||
|
||||
/*
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user