Commit Graph
6 Commits
Author SHA1 Message Date
Zach Brown 955d940c64 Restore key tracing
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>
2017-04-18 13:51:10 -07:00
Zach Brown eb94092f2f Add kvec big endian inc and dec
Add helpers that increment or decrement kvec vectors as theough they're
big endian values.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 13:44:53 -07:00
Zach Brown cbb4282429 Add kvec key helpers
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>
2017-04-18 13:44:53 -07:00
Zach Brown c74787a848 Harden, simplify, and shrink the kvecs
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>
2017-04-18 13:44:53 -07:00
Zach Brown c4954eb6f4 Add initial LSM write implementation
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>
2017-04-18 13:42:30 -07:00
Zach Brown 43d0d44e48 Add initial LSM implementation
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>
2017-04-18 13:38:50 -07:00