diff --git a/source/ftl/ftl.c b/source/ftl/ftl.c index 27e23e9..68fdca4 100644 --- a/source/ftl/ftl.c +++ b/source/ftl/ftl.c @@ -650,9 +650,11 @@ int ftl_trim(struct ftl_journal *j, uint32_t va) if (i == 32) { j->root = UINT32_MAX; - /* TODO: how do we clean the FTL? */ - return 0; + memset(&page_desc, 0xff, sizeof page_desc); + page_desc.nused_pages = 0; + + return ftl_write_upage(j, NULL, &page_desc); } if (read_page_desc(j, &alt_page_desc, alt_va) < 0)