Spdk/test/unit/lib
Jim Harris cdd089a8c5 blobfs: don't flush a partial buffer with no sync pending
We flush a cache buffer once it's filled.  When the write
for that cache buffer has completed, we look to see if
there's more data to flush.  Currently if there's *any*
more data to flush, we will flush it, even if it's not
a full buffer.

That can hurt performance though.  Ideally we only want
to flush a partial buffer if there's been an explicit
sync operation that requires that partial buffer to be
flushed.  Otherwise we will end up writing the partial
buffer to disk, and then come back and write that data
again later when the buffer is full.

Add a new unit test to test for this condition.  This
patch breaks one of the existing unit tests which was
designed specifically around a RocksDB failure condition.
Change that file_length unit test to now write exactly
one CACHE_BUFFER, which still tests the general logic
making sure that we don't confuse the amount of data
flushed with the value written to the file's length
xattr.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455698
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-05-27 06:45:41 +00:00
..
bdev bdev/compress: add UT for the poller 2019-05-22 15:36:48 +00:00
blob blobstore: Remove blob on blobstore load when required 2019-05-24 23:09:56 +00:00
blobfs blobfs: don't flush a partial buffer with no sync pending 2019-05-27 06:45:41 +00:00
event event: No longer require event in spdk_subsystem_fini 2019-03-08 03:21:45 +00:00
ftl lib/ftl: consider 3D TLC NAND read unit size 2019-05-24 23:29:22 +00:00
ioat test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
iscsi thread: Add a mechanism to exit a lightweight thread 2019-05-22 04:23:17 +00:00
json json: add utilities function enabling itaration over JSON object 2018-10-18 16:07:37 +00:00
jsonrpc jsonrpc: fix received JSON buffer overwrite 2019-01-10 14:31:37 +00:00
log test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
lvol lvol: Fix for lvol failed deletion flow 2019-04-02 19:23:22 +00:00
notify lib/notify: rename spdk_notify_get_events to spdk_notify_foreach_event 2019-05-07 06:11:27 +00:00
nvme unit/nvme: add nvme_request_check_timeout() unit test 2019-05-14 22:49:12 +00:00
nvmf thread: Add a mechanism to exit a lightweight thread 2019-05-22 04:23:17 +00:00
reduce ut/reduce: use compress algorithm 2019-04-02 21:40:21 +00:00
scsi scsi: add persistent reservation out with register feature support 2019-05-24 23:04:03 +00:00
sock sock: Add spdk_sock_readv(sock, iov, iovcnt) 2019-03-08 01:21:26 +00:00
thread thread: Add a mechanism to exit a lightweight thread 2019-05-22 04:23:17 +00:00
util dif: Support multiple iovecs for data buffer in spdk_dif_generate_stream 2019-05-16 20:17:44 +00:00
vhost vhost_ut: Add tests for spdk_vhost_vq_avail_ring_get 2019-05-21 05:29:44 +00:00
json_mock.c subsystem: add per module configuration dump 2018-03-23 02:47:40 -04:00
Makefile bdev/nvme: always enable FTL 2019-05-02 08:41:56 +00:00