Spdk/test
Jim Harris b85a64c878 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>

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455698 (master)

(cherry picked from commit cdd089a8c5)
Change-Id: I83795fb45afe854b38648d0e0c1a7928219307a2
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457276
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-18 10:59:28 +00:00
..
app notify: add notification library 2019-03-29 21:15:14 +00:00
bdev test/raid: switch from config file to RPC 2019-06-16 08:46:05 +00:00
blobfs test/rocksdb: suppress leak reports on thread local ctx 2019-06-16 08:46:05 +00:00
blobstore histograms: tests for bdev histograms 2019-01-24 21:50:18 +00:00
common thread: Add cpumask parameter to spdk_thread_create 2019-04-23 20:22:55 +00:00
config_converter NVMF: Add model number as parameter to construct_nvmf_subsystem (-d option). 2019-04-23 16:51:16 +00:00
cpp_headers build: don't include spdk.app.mk in test/cpp_headers 2018-12-12 22:35:21 +00:00
env test: add mem_callbacks unit test 2019-03-12 13:58:57 +00:00
event notify: add notification library 2019-03-29 21:15:14 +00:00
ftl bdev/ftl: Add json config generation 2019-04-01 23:59:39 +00:00
ioat ioat: remove ioat kperf kernel driver test harness 2018-04-30 17:11:53 +00:00
iscsi_tgt test/qos: disable iscsi qos tests 2019-04-29 17:32:26 +00:00
json_config test/notify: fix parameters' mismatching 2019-06-16 14:44:50 +00:00
lvol test/lvol: Implement test case 653 2019-03-01 22:54:07 +00:00
nvme test/nvme: make reset test exit 0 on QEMU SSDs 2019-06-16 14:44:50 +00:00
nvmf test/nvmf: fix host/fio.sh test 2019-06-16 08:46:05 +00:00
ocf test/ocf: enable serialize_overlap flag for FIO 2019-06-18 07:11:21 +00:00
pmem bdev: remove delete_bdev RPC 2019-03-01 08:50:07 +00:00
rpc_client jsonrpc: add connection close callback 2019-01-10 14:31:37 +00:00
spdkcli test/spdkcli: update match file to cover larger volume NVMe SSD 2019-03-08 02:18:15 +00:00
unit blobfs: don't flush a partial buffer with no sync pending 2019-06-18 10:59:28 +00:00
vhost test/vhost: add number of iterations for fio to run in benchmark 2019-04-25 05:40:36 +00:00
Makefile jsonrpc-client: add new C client library 2018-10-11 20:07:44 +00:00
spdk_cunit.h test: remove leftover spdk_cunit declaration 2018-07-06 22:47:56 +00:00