Remove re_part
field from struct ocf_req_info
Since the request carries an explicit information about number of the cacheliens to be reparted, no need of keeping the boolean information if some of the request's cachelines are assigned to a wrong partition Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
parent
e26ca30399
commit
9d80882b00
@ -127,7 +127,7 @@ void ocf_engine_update_req_info(struct ocf_cache *cache,
|
|||||||
/*
|
/*
|
||||||
* Need to move this cache line into other partition
|
* Need to move this cache line into other partition
|
||||||
*/
|
*/
|
||||||
_entry->re_part = req->info.re_part = true;
|
_entry->re_part = true;
|
||||||
req->info.re_part_no++;
|
req->info.re_part_no++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ static int _ocf_read_fast_do(struct ocf_request *req)
|
|||||||
/* Get OCF request - increase reference counter */
|
/* Get OCF request - increase reference counter */
|
||||||
ocf_req_get(req);
|
ocf_req_get(req);
|
||||||
|
|
||||||
if (req->info.re_part) {
|
if (ocf_engine_needs_repart(req)) {
|
||||||
OCF_DEBUG_RQ(req, "Re-Part");
|
OCF_DEBUG_RQ(req, "Re-Part");
|
||||||
|
|
||||||
ocf_req_hash_lock_wr(req);
|
ocf_req_hash_lock_wr(req);
|
||||||
|
@ -67,7 +67,7 @@ int ocf_read_pt_do(struct ocf_request *req)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req->info.re_part) {
|
if (ocf_engine_needs_repart(req)) {
|
||||||
OCF_DEBUG_RQ(req, "Re-Part");
|
OCF_DEBUG_RQ(req, "Re-Part");
|
||||||
|
|
||||||
ocf_req_hash_lock_wr(req);
|
ocf_req_hash_lock_wr(req);
|
||||||
|
@ -172,7 +172,7 @@ static int _ocf_read_generic_do(struct ocf_request *req)
|
|||||||
ocf_req_hash_unlock_rd(req);
|
ocf_req_hash_unlock_rd(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req->info.re_part) {
|
if (ocf_engine_needs_repart(req)) {
|
||||||
OCF_DEBUG_RQ(req, "Re-Part");
|
OCF_DEBUG_RQ(req, "Re-Part");
|
||||||
|
|
||||||
ocf_req_hash_lock_wr(req);
|
ocf_req_hash_lock_wr(req);
|
||||||
|
@ -121,7 +121,7 @@ static inline void _ocf_write_wb_submit(struct ocf_request *req)
|
|||||||
* 3. Then continue processing request (flush metadata)
|
* 3. Then continue processing request (flush metadata)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (req->info.re_part) {
|
if (ocf_engine_needs_repart(req)) {
|
||||||
OCF_DEBUG_RQ(req, "Re-Part");
|
OCF_DEBUG_RQ(req, "Re-Part");
|
||||||
|
|
||||||
ocf_req_hash_lock_wr(req);
|
ocf_req_hash_lock_wr(req);
|
||||||
|
@ -118,7 +118,7 @@ static void _ocf_write_wt_update_bits(struct ocf_request *req)
|
|||||||
ocf_req_hash_unlock_wr(req);
|
ocf_req_hash_unlock_wr(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req->info.re_part) {
|
if (ocf_engine_needs_repart(req)) {
|
||||||
OCF_DEBUG_RQ(req, "Re-Part");
|
OCF_DEBUG_RQ(req, "Re-Part");
|
||||||
|
|
||||||
ocf_req_hash_lock_wr(req);
|
ocf_req_hash_lock_wr(req);
|
||||||
|
@ -33,11 +33,6 @@ struct ocf_req_info {
|
|||||||
uint32_t mapping_error : 1;
|
uint32_t mapping_error : 1;
|
||||||
/*!< Core lines in this request were not mapped into cache */
|
/*!< Core lines in this request were not mapped into cache */
|
||||||
|
|
||||||
uint32_t re_part : 1;
|
|
||||||
/*!< This bit indicate that in the request some cache lines
|
|
||||||
* has to be moved to another partition
|
|
||||||
*/
|
|
||||||
|
|
||||||
uint32_t core_error : 1;
|
uint32_t core_error : 1;
|
||||||
/*!< Error occured during I/O on core device */
|
/*!< Error occured during I/O on core device */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user