mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-07 04:26:29 +00:00
Add a file for userspace quorum config helpers
Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
10
utils/src/quorum.c
Normal file
10
utils/src/quorum.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "sparse.h"
|
||||
#include "util.h"
|
||||
#include "format.h"
|
||||
|
||||
#include "quorum.h"
|
||||
|
||||
bool quorum_slot_present(struct scoutfs_super_block *super, int i)
|
||||
{
|
||||
return super->qconf.slots[i].addr.v4.family == cpu_to_le16(SCOUTFS_AF_IPV4);
|
||||
}
|
||||
8
utils/src/quorum.h
Normal file
8
utils/src/quorum.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef _QUORUM_H_
|
||||
#define _QUORUM_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
bool quorum_slot_present(struct scoutfs_super_block *super, int i);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user