Use little helpers to insert items into new single block btrees for
mkfs. We're about to insert a whole bunch more items.
Signed-off-by: Zach Brown <zab@versity.com>
The calculation of the last valid data blkno was off by one. It was
calculating the total number of small blocks that fit in the device
size.
Signed-off-by: Zach Brown <zab@versity.com>
The recent cleanup of the radix allocator included removing tracking of
the first set bits or references in blocks.
Signed-off-by: Zach Brown <zab@versity.com>
Track the kernel changes to use the scoutfs_key struct as the btree key
instead of a big-endian binary blob.
Signed-off-by: Zach Brown <zab@versity.com>
The kernel has long sinced moved away from symbolic printing of key
cones and types, and it just removed the MAX values from the format
header. Let's follow suit and get rid of the zone and type strings.
Signed-off-by: Zach Brown <zab@versity.com>
We had manually implemented a few of the functions to add values to
specific endian types. Make a macro to generate the function and
generate them for all the endian types we use.
Signed-off-by: Zach Brown <zab@versity.com>
Add support for reporting errors to data waiters via a new
SCOUTFS_IOC_DATA_WAIT_ERR ioctl. This allows waiters to return an error
to readers when staging fails.
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
[zab: renamed to data_wait_err, took ino arg]
Signed-off-by: Zach Brown <zab@versity.com>
Remove the definitions and descriptions of sources of corruption that
are no longer identified by the kernel module.
Signed-off-by: Zach Brown <zab@versity.com>
It's handy to use ilog2 in the format header for defining shifts based
on values. Add a userspace helper that uses glibc's log2 functions.
Signed-off-by: Zach Brown <zab@versity.com>
Add support for initializing radix allocator blocks that describe free
space in mkfs and support for printing them out.
Signed-off-by: Zach Brown <zab@versity.com>
Add a scoutfs command wrapper around the statfs_moe ioctl. It's the
same as the stat_more ioctl but has different fields and a different
ioctl.
Signed-off-by: Zach Brown <zab@versity.com>
Now that networking is identifing clients by their rid some persistent
structures are using that to store records of clients.
Signed-off-by: Zach Brown <zab@versity.com>
The format no longer has statically configured named slots. The only
persistent config is the number of monts that must be voting to reach
quorum. The quorum blocks now have a log of successfull elections.
Signed-off-by: Zach Brown <zab@versity.com>
Add support for the xattr tags which can hide or index xattrs by their
name. We get an item that indexes inodes by the presence of an xattr, a
listxattr_raw ioctl which can show hidden xattrs, and an ioctl that
finds inodes which have an xattr.
Signed-off-by: Zach Brown <zab@versity.com>
The error return conventions were confused, resulting in main exiting
with success when command execution failed.
Signed-off-by: Zach Brown <zab@versity.com>
Remove the ctrstat command. It was built back when we had a handful of
counters. It's output format doesn't make much sense now that we have
an absolute ton of counters. If we want fancy counter output in the
future we'd add it to the counters command.
Signed-off-by: Zach Brown <zab@versity.com>
Add a command to output the sysfs counters for a volume, with the option
of generating a table that fits the terminal.
Signed-off-by: Zach Brown <zab@versity.com>