mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 03:16:59 -05:00
Adds a new "dup" command to find duplicates.
This commit is contained in:
parent
8585485868
commit
cec7b2f2b4
10 changed files with 193 additions and 22 deletions
14
elem.c
14
elem.c
|
|
@ -353,20 +353,10 @@ struct snapraid_disk* disk_alloc(const char* name, const char* dir, uint64_t dev
|
|||
|
||||
void disk_free(struct snapraid_disk* disk)
|
||||
{
|
||||
tommy_node* node = disk->filelist;
|
||||
while (node) {
|
||||
struct snapraid_file* file = node->data;
|
||||
node = node->next;
|
||||
file_free(file);
|
||||
}
|
||||
tommy_list_foreach(&disk->filelist, (tommy_foreach_func*)file_free);
|
||||
tommy_hashdyn_done(&disk->inodeset);
|
||||
tommy_hashdyn_done(&disk->pathset);
|
||||
node = disk->linklist;
|
||||
while (node) {
|
||||
struct snapraid_link* link = node->data;
|
||||
node = node->next;
|
||||
link_free(link);
|
||||
}
|
||||
tommy_list_foreach(&disk->linklist, (tommy_foreach_func*)link_free);
|
||||
tommy_hashdyn_done(&disk->linkset);
|
||||
tommy_array_done(&disk->blockarr);
|
||||
free(disk);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue