ftl: trim last sector by writing an empty page descriptor
This commit is contained in:
parent
1c396c407a
commit
24ab1dd9b7
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue