reduce: use consistent callback names
There are a sequence of operations needed for both read and write I/O. For example, on a write I/O, we may need to do a read, modify the chunk, then write the data back to disk. For read I/O, the name of the callback is _read_read_done - the first "read" indicates the I/O type, the second "read" indicates the disk read part of the sequence. The write I/O steps aren't using this same naming convention, so change that here. This will be important in upcoming patches where we'll be adding compress/decompress steps into the I/O pipeline - having a consistent naming strategy will make the code easier to follow. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Icd525874918378118d807acdbe5dd42d5be03126 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449258 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
f9ac7dcf11
commit
72da9b7562
@ -888,7 +888,7 @@ _reduce_vol_complete_req(struct spdk_reduce_vol_request *req, int reduce_errno)
|
||||
}
|
||||
|
||||
static void
|
||||
_write_complete_req(void *_req, int reduce_errno)
|
||||
_write_write_done(void *_req, int reduce_errno)
|
||||
{
|
||||
struct spdk_reduce_vol_request *req = _req;
|
||||
struct spdk_reduce_vol *vol = req->vol;
|
||||
@ -1022,7 +1022,7 @@ _write_read_done(void *_req, int reduce_errno)
|
||||
buf += req->iov[i].iov_len;
|
||||
}
|
||||
|
||||
_reduce_vol_write_chunk(req, _write_complete_req);
|
||||
_reduce_vol_write_chunk(req, _write_write_done);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1213,7 +1213,7 @@ _start_writev_request(struct spdk_reduce_vol_request *req)
|
||||
if (chunk_offset != lb_per_chunk) {
|
||||
memset(buf, 0, (lb_per_chunk - chunk_offset) * lbsize);
|
||||
}
|
||||
_reduce_vol_write_chunk(req, _write_complete_req);
|
||||
_reduce_vol_write_chunk(req, _write_write_done);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user