mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-22 22:40:31 +00:00
Originally the item interfaces were written with full support for vectored keys and values. Callers constructed keys and values made up of header structs and data buffers. Segments supported much larger values which could span pages when stored in memory. But over time we've pulled that support back. Keys are described by a key struct instead of a multi-element kvec. Values are now much smaller and don't span pages. The item interfaces still use the kvec arrays but everyone only uses a single element. So let's make the world a whole lot less awful but having the item interfaces only supporting a single value buffer specified by a kvec. A bunch of code disappears and the result is much easier to understand. Signed-off-by: Zach Brown <zab@versity.com>
13 lines
199 B
C
13 lines
199 B
C
#ifndef _SCOUTFS_KVEC_H_
|
|
#define _SCOUTFS_KVEC_H_
|
|
|
|
#include <linux/uio.h>
|
|
|
|
static inline void kvec_init(struct kvec *kv, void *base, size_t len)
|
|
{
|
|
kv->iov_base = base;
|
|
kv->iov_len = len;
|
|
}
|
|
|
|
#endif
|