lib/ftl: remove num_blocks parameter from submit_child_write()
This parameter always has to be the same (device's write unit size), so it's redundant. Change-Id: I8775171fe2d526a6e87337e0398f3c9d18bc184d Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/896 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
26f39f1e34
commit
3a228b6c75
@ -1579,7 +1579,7 @@ ftl_io_child_write_cb(struct ftl_io *io, void *ctx, int status)
|
||||
}
|
||||
|
||||
static int
|
||||
ftl_submit_child_write(struct ftl_wptr *wptr, struct ftl_io *io, int num_blocks)
|
||||
ftl_submit_child_write(struct ftl_wptr *wptr, struct ftl_io *io)
|
||||
{
|
||||
struct spdk_ftl_dev *dev = io->dev;
|
||||
struct ftl_io_channel *ioch;
|
||||
@ -1610,12 +1610,12 @@ ftl_submit_child_write(struct ftl_wptr *wptr, struct ftl_io *io, int num_blocks)
|
||||
rc = spdk_bdev_zone_append(dev->base_bdev_desc, ioch->base_ioch,
|
||||
ftl_io_iovec_addr(child),
|
||||
ftl_addr_get_zone_slba(dev, addr),
|
||||
num_blocks, ftl_io_cmpl_cb, child);
|
||||
dev->xfer_size, ftl_io_cmpl_cb, child);
|
||||
} else {
|
||||
rc = spdk_bdev_write_blocks(dev->base_bdev_desc, ioch->base_ioch,
|
||||
ftl_io_iovec_addr(child),
|
||||
addr.offset,
|
||||
num_blocks, ftl_io_cmpl_cb, child);
|
||||
dev->xfer_size, ftl_io_cmpl_cb, child);
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
@ -1628,7 +1628,7 @@ ftl_submit_child_write(struct ftl_wptr *wptr, struct ftl_io *io, int num_blocks)
|
||||
}
|
||||
|
||||
ftl_io_inc_req(child);
|
||||
ftl_io_advance(child, num_blocks);
|
||||
ftl_io_advance(child, dev->xfer_size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1652,7 +1652,7 @@ ftl_submit_write(struct ftl_wptr *wptr, struct ftl_io *io)
|
||||
break;
|
||||
}
|
||||
|
||||
rc = ftl_submit_child_write(wptr, io, dev->xfer_size);
|
||||
rc = ftl_submit_child_write(wptr, io);
|
||||
if (spdk_unlikely(rc)) {
|
||||
if (rc == -EAGAIN) {
|
||||
TAILQ_INSERT_TAIL(&wptr->pending_queue, io, ioch_entry);
|
||||
|
Loading…
Reference in New Issue
Block a user