Now that RedStatFile is private there is no need
to include some headers in stat-file.h.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
mmap memory area will remain even if the descriptor is closed.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Avoid to produce loop in the tree removing and adding nodes.
Unlink the node from the containing tree.
This possibly will create unlinked trees if a parent node is
deleted.
What was happening is that the creation of loops inside
the tree caused some statistical function to go into an
infinite loop (and reds_stat tool too).
Nodes were only invalidated but still linked so when reused
the new node could point to an already existing node (like a
sibling) which pointed to the new reused one.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Code is quite independent so move in separate file.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>