if (location.directory == BLUESKY_CLOUD_DIR_PRIMARY)
return FALSE;
+ if (location.directory == BLUESKY_CLOUD_DIR_CLEANER
+ && location.sequence <= fs->log_state->latest_cleaner_seq_seen)
+ return FALSE;
+
return TRUE;
}
for (int i = 0; i < checkpoint->links->len; i++) {
BlueSkyCleanerLink *link = &g_array_index(checkpoint->links,
BlueSkyCleanerLink, i);
- /*if (!needs_merging(fs, link->location))
- continue; */
+ if (!needs_merging(fs, link->location))
+ continue;
BlueSkyCleanerItem *imap = cleaner_load_item(fs, link->location);
if (imap == NULL) {
for (int j = 0; j < imap->links->len; j++) {
BlueSkyCleanerLink *link = &g_array_index(imap->links,
BlueSkyCleanerLink, j);
+ if (!needs_merging(fs, link->location))
+ continue;
BlueSkyCleanerItem *inode = cleaner_load_item(fs, link->location);
if (inode != NULL) {
g_print("Got inode %"PRIu64"\n", inode->inum);