summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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,