Spdk/lib
Jim Harris 383b117309 reduce: implement read and write with data
For write operations, copy data to req->buf and write
to disk.

If chunk already specified in logical map, read the
chunk first into req->buf, and overwrite with data
specified by the write operation.

If chunk not specified in logical map, fill logical
blocks not specified by the write operation with
zeroes.

For read operations, read chunk into req->buf first,
then copy relevant data into the buffers specified
by the read operations.

These operations are all functional, but have room
for future improvement.  For example, this patch
will issue a separate backing read/write operations
for each backing block in the chunk - this could be
optimized to coalesce operations where the backing
blocks are contiguous.

While here, clean up freeing bufspace in one of
the error paths - this needs to be freed using
spdk_dma_free instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6dbf4fc9a8fdf0f5424b1f1f9178c79891c96d0d

Reviewed-on: https://review.gerrithub.io/434116
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-12-13 14:55:39 +00:00
..
bdev bdev/crypto: remove some prints to clean up output 2018-12-10 20:40:31 +00:00
blob log: remove "trace" from internal API 2018-12-03 19:50:15 +00:00
blobfs log: remove "trace" from internal API 2018-12-03 19:50:15 +00:00
conf conf: don't strdup name if section already exist 2018-05-17 17:13:19 +00:00
copy lib/copy: unregister copy engine on finish 2018-10-15 17:42:20 +00:00
env_dpdk pci: remove virtio-specific attach functions 2018-12-07 17:24:19 +00:00
event app: fixup error handling in wait_subsystem_init RPC 2018-12-10 15:55:32 +00:00
ioat pci: remove ioat-specific attach functions 2018-12-07 17:24:19 +00:00
iscsi iscsi: Propagate SCSI error status to split SCSI read/write commands 2018-12-11 16:37:55 +00:00
json json: Use not C++ style comments // but C-style comments /* */ 2018-10-31 22:01:47 +00:00
jsonrpc jsonrpc client: non-blocking mode 2018-12-07 09:41:03 +00:00
log app: rename traceflag cmdline option to logflag 2018-12-03 19:50:15 +00:00
lvol lvol: lock g_lvol_stores_mutex when access g_lvol_stores 2018-12-13 08:10:51 +00:00
nbd nbd: fixup return codes 2018-11-28 22:55:09 +00:00
net lib: fix typos in the lib directory 2018-08-24 17:15:12 +00:00
nvme nvme/tcp: solve the adminq is not created issue. 2018-12-12 20:44:01 +00:00
nvmf nvmf: Re-add spdk_nvmf_transport_poll_group_remove 2018-12-13 02:41:14 +00:00
reduce reduce: implement read and write with data 2018-12-13 14:55:39 +00:00
rocksdb env: remove default pre-reserved memory size 2018-12-12 11:00:57 +00:00
rpc rpc: add spdk_rpc_is_method_allowed 2018-12-05 00:35:35 +00:00
scsi scsi: Set TMF code prior to calling spdk_scsi_dev_queue_mgmt_task 2018-12-10 20:34:11 +00:00
sock net: add asynchronous initialization and finish 2018-11-07 17:08:27 +00:00
thread thread: Fix check that prevented a debug log from printing 2018-12-07 17:13:10 +00:00
trace lib/trace: group registration check 2018-12-05 06:20:47 +00:00
ut_mock ut_mock: rename library from spdk_mock to ut_mock 2018-11-20 14:57:57 +00:00
util util/uuid: add a new uuid copy API. 2018-12-06 22:25:09 +00:00
vhost scsi: Set TMF code prior to calling spdk_scsi_dev_queue_mgmt_task 2018-12-10 20:34:11 +00:00
virtio pci: remove virtio-specific attach functions 2018-12-07 17:24:19 +00:00
Makefile reduce: add configure option 2018-11-08 00:01:47 +00:00