Now that the keys are a contiguous buffer we can format them for the
trace buffers with a much more straight forward type check around
per-key snprintfs. We can get rid of all the weird kvec code that tried
to deal with keys that straddled vectors.
With that fixed we can uncomment out the tracing statements that were
waiting the key formatting.
I was testing with xattr keys so they're added as the code is updated.
The rest of the key types will be added seperately as they're used.
Signed-off-by: Zach Brown <zab@versity.com>
Add a suite of simple kvec functions to work with kvecs that point to
file system keys.
The ones worth mentioning format keys into strings. They're used to
add formatted strings for the keys to tracepoints. They're still a
little rough but this is a functional first step.
Signed-off-by: Zach Brown <zab@versity.com>
The initial kvec code was a bit wobbly. It had raw loops, some weird
constructs, and had more elements than we need.
Add some iterator helpers that make it less likely that we'll screw up
iterating over different length vectors. Get rid of reliance on a
tailing null pointer and always use the count of elements to stop
iterating. With that in place we can shrink the number of elements to
just the greatest user.
Signed-off-by: Zach Brown <zab@versity.com>
Add all the core strutural components to be able to modify metadata. We
modify items in fs write operations, track dirty items in the cache,
allocate free segment block reagions, stream dirty items into segments,
write out the segments, update the manifest to reference the written
segments, and write out a new ring that has the new manifest.
Signed-off-by: Zach Brown <zab@versity.com>
Add the initial core components of the LSM implementation to be able to
read the root inode:
- bio.c: read big block regions
- seg.c: cache logical segments
- ring.c: read the manifest from storage
- manifest.c: organize segments into an LSM
- kvec.c: work with arbitrary memory vectors
- item.c: cache fs metadata items read from segments
Signed-off-by: Zach Brown <zab@versity.com>