@@ -41,6 +41,9 @@ enum ocf_io_if_type {
4141 OCF_IO_FAST_IF ,
4242 OCF_IO_FLUSH_IF ,
4343 OCF_IO_DISCARD_IF ,
44+ OCF_IO_REFRESH_IF ,
45+ OCF_IO_INVALIDATE_IF ,
46+ OCF_IO_RD_IF ,
4447 OCF_IO_PRIV_MAX_IF ,
4548};
4649
@@ -108,6 +111,18 @@ static const struct ocf_io_if IO_IFS[OCF_IO_PRIV_MAX_IF] = {
108111 },
109112 .name = "Discard" ,
110113 },
114+ [OCF_IO_REFRESH_IF ] = {
115+ .cbs = { },
116+ .name = "Refresh" ,
117+ },
118+ [OCF_IO_INVALIDATE_IF ] = {
119+ .cbs = { },
120+ .name = "Invalidate" ,
121+ },
122+ [OCF_IO_RD_IF ] = {
123+ .cbs = { },
124+ .name = "Read generic" ,
125+ },
111126};
112127
113128static const struct ocf_io_if * cache_mode_io_if_map [ocf_req_cache_mode_max ] = {
@@ -118,8 +133,29 @@ static const struct ocf_io_if *cache_mode_io_if_map[ocf_req_cache_mode_max] = {
118133 [ocf_req_cache_mode_wo ] = & IO_IFS [OCF_IO_WO_IF ],
119134 [ocf_req_cache_mode_pt ] = & IO_IFS [OCF_IO_PT_IF ],
120135 [ocf_req_cache_mode_fast ] = & IO_IFS [OCF_IO_FAST_IF ],
136+ [ocf_req_refresh ] = & IO_IFS [OCF_IO_REFRESH_IF ],
137+ [ocf_req_cache_mode_discard ] = & IO_IFS [OCF_IO_DISCARD_IF ],
138+ [ocf_req_cache_mode_invalidate ] = & IO_IFS [OCF_IO_INVALIDATE_IF ],
139+ [ocf_req_cache_mode_rd ] = & IO_IFS [OCF_IO_RD_IF ],
121140};
122141
142+ void ocf_debug_request_trace (struct ocf_request * req ,
143+ ocf_req_cache_mode_t engine , uint8_t info )
144+ {
145+ uint8_t tmp = (uint8_t )engine ;
146+
147+ ENV_BUG_ON (info > 0xf );
148+ ENV_BUG_ON (engine > 0xf );
149+
150+ ENV_WARN_ON (req -> engine_trace & 0xff00000000000000 );
151+
152+ req -> engine_trace <<= 4 ;
153+ req -> engine_trace |= engine ;
154+
155+ req -> engine_trace <<= 4 ;
156+ req -> engine_trace |= tmp ;
157+ }
158+
123159const char * ocf_get_io_iface_name (ocf_req_cache_mode_t cache_mode )
124160{
125161 if (cache_mode == ocf_req_cache_mode_max )
0 commit comments