1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #pragma once
6 
7 #include <fsprivate.h>
8 #include <fscache.h>
9 
10 /***********************************************************************/
11 /* Symbol Definitions                                                  */
12 /***********************************************************************/
13 #define FTLVC_WRITE 1
14 #define FTLVC_READ 2
15 
16 /***********************************************************************/
17 /* Function Prototypes                                                 */
18 /***********************************************************************/
19 void* ftlvcNew(void* ftl, ui32 num_cached_pages, MedWFunc wr_page, MedRFunc rd_page, ui32 page_sz);
20 void ftlvcDelete(void* ftlvc);
21 FcEntry* ftlvcGetRdPage(void* ftlvc, ui32 vpn);
22 int ftlvcFlushPage(void* ftlvc, ui32 vpn);
23 void ftlvcSetPageDirty(void* ftlvc, FcEntry* ftlvc_ent);
24 void ftlvcUpdate(void* ftlvc, ui32 start_vpn, ui32 n, const ui8* data, ui32 page_sz);
25