summaryrefslogtreecommitdiff
path: root/lib/fstree
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-12 11:30:22 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-19 14:27:34 +0200
commit0e7fba27a26694f6babe5bd5de93733760cd770d (patch)
treeb8ed2424ad47a989ca9cacea8c3bc1a82b86eabf /lib/fstree
parent28b24512622785d1634a089f7d1d5c25edfb7577 (diff)
Add xattr indices to inodes
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/fstree')
-rw-r--r--lib/fstree/fstree.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/fstree/fstree.c b/lib/fstree/fstree.c
index 356f65a..0c3f13d 100644
--- a/lib/fstree/fstree.c
+++ b/lib/fstree/fstree.c
@@ -260,6 +260,15 @@ static int cmp_u64(const void *lhs, const void *rhs)
return l < r ? -1 : (l > r ? 1 : 0);
}
+void fstree_xattr_reindex(fstree_t *fs)
+{
+ tree_xattr_t *it;
+ size_t index = 0;
+
+ for (it = fs->xattr; it != NULL; it = it->next)
+ it->index = index++;
+}
+
void fstree_xattr_deduplicate(fstree_t *fs)
{
tree_xattr_t *it, *it1, *prev;
@@ -293,6 +302,8 @@ void fstree_xattr_deduplicate(fstree_t *fs)
it = it->next;
}
}
+
+ fstree_xattr_reindex(fs);
}
int fstree_init(fstree_t *fs, size_t block_size, uint32_t mtime,