From 73db760b3fd2d3f2ff9186deb86589fdc36f2542 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 21 Jul 2019 15:24:38 +0200 Subject: Cleanup xattr handling - Store them in a struct instead of a hacky uint64_t with magic shifts - Split up key/value pair write function to write_key and write_value - Move the size accounting into those functions respectively Signed-off-by: David Oberhollenzer --- include/fstree.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/fstree.h b/include/fstree.h index ea7cf88..4efa9d5 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -46,9 +46,11 @@ struct tree_xattr_t { /* linked list pointer of list of attributes in @ref fstree_t */ tree_xattr_t *next; - /* Array with pairs of key-value tupples. - Each key-value tupple is encoded as (key << 32) | value. */ - uint64_t ref[]; + /* Array with pairs of key-value tupples */ + struct { + uint32_t key_index; + uint32_t value_index; + } attr[]; }; /* Additional meta data stored in a tree_node_t for regular files. */ -- cgit v1.2.3