Commit Graph

6 Commits

Author SHA1 Message Date
Zach Brown
87fcad5428 Update scoutfs mkfs and print for quorum slots
Signed-off-by: Zach Brown <zab@versity.com>
2021-02-22 13:28:38 -08:00
Andy Grover
a3035582d3 Add strdup_or_error()
Add a helper function to handle the impossible event that strdup fails.

Signed-off-by: Andy Grover <agrover@versity.com>
2021-01-04 11:49:31 -08:00
Andy Grover
8f72d16609 scoutfs-utils: Use separate block devices for metadata and data
mkfs: Take two block devices as arguments. Write everything to metadata
dev, and the superblock to the data dev. UUIDs match. Differentiate by
checking a bit in a new "flags" field in the superblock.

Refactor device_size() a little. Convert spaces to tabs.

Move code to pretty-print sizes to dev.c so we can use it in error
messages there, as well as in mkfs.c.

print: Include flags in output.

Add -D and -M options for setting max dev sizes

Allow sizes to be specified using units like "K", "G" etc.

Note: -D option replaces -S option, and uses above units rather than
the number of 4k data blocks.

Update man pages for cmdline changes.

Signed-off-by: Andy Grover <agrover@versity.com>
2020-11-19 11:41:54 -08:00
Zach Brown
0a8faf3e94 scoutfs-utils: add parse_s64()
Signed-off-by: Zach Brown <zab@versity.com>
2020-05-29 13:50:25 -07:00
Zach Brown
8597fd0bfc scoutfs-utils: naturally align ioctl structs
Use natuturally aligned and explicitly padded ioctl structs.

Signed-off-by: Zach Brown <zab@versity.com>
2019-06-27 11:39:19 -07:00
Zach Brown
ffe15c2d82 scoutfs-utils: add string parsing functions
We're starting to collect a few of these.  Let's put them in one place.

Signed-off-by: Zach Brown <zab@versity.com>
2019-05-30 13:45:57 -07:00