lib/reduce: eliminate RMW on writes with chunk_size length
Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: I6545a91e2ae4805f7bd1d92baa6dcbce0f1f8fba Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459864 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
d23c36a169
commit
63d9d2e2b0
@ -1363,12 +1363,13 @@ _start_writev_request(struct spdk_reduce_vol_request *req)
|
||||
|
||||
TAILQ_INSERT_TAIL(&req->vol->executing_requests, req, tailq);
|
||||
if (vol->pm_logical_map[req->logical_map_index] != REDUCE_EMPTY_MAP_ENTRY) {
|
||||
/* Read old chunk, then overwrite with data from this write operation.
|
||||
* TODO: bypass reading old chunk if this write operation overwrites
|
||||
* the entire chunk.
|
||||
*/
|
||||
_reduce_vol_read_chunk(req, _write_read_done);
|
||||
return;
|
||||
if ((req->length * vol->params.logical_block_size) < vol->params.chunk_size) {
|
||||
/* Read old chunk, then overwrite with data from this write
|
||||
* operation.
|
||||
*/
|
||||
_reduce_vol_read_chunk(req, _write_read_done);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
lbsize = vol->params.logical_block_size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user