From 4c2f4eab24428c71b057fe402e2e24edb6cacb86 Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Tue, 3 Oct 2017 14:55:32 +0200 Subject: [PATCH] ftl: call trace_path() in ftl_sync() to get the page descriptor to write out --- source/ftl/ftl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/ftl/ftl.c b/source/ftl/ftl.c index 68f3d49..a54dc07 100644 --- a/source/ftl/ftl.c +++ b/source/ftl/ftl.c @@ -132,6 +132,7 @@ int ftl_sync(struct ftl_map *map) { struct ftl_page_desc page_desc; size_t len; + int ret; uint32_t dst, src; if (!(map->outstanding.flags & FTL_PRESENT)) @@ -148,6 +149,10 @@ int ftl_sync(struct ftl_map *map) page_desc.nused_pages = map->nused_pages; + if ((ret = trace_path(map, &page_desc, NULL, map->outstanding.va)) < 0 && + ret != -ERR_NOT_FOUND) + return -1; + if (write_page_desc(map, &page_desc) < 0) return -1;