Spdk/test
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
..
app util: add a new file operation API 2019-05-15 18:54:27 +00:00
bdev test/bdevio: enable RPC listening socket 2019-05-22 15:51:36 +00:00
blobfs rocksdb: cleanup SpdkInitializeThread/SpdkFinalizeThread 2019-05-02 09:00:43 +00:00
blobstore test: don't call python explicitly 2019-05-08 14:22:19 +00:00
common autotest_common.sh: move exporting flag values to the top of the file. 2019-05-24 23:43:37 +00:00
config_converter iscsi: Deprecate MinConnectionsPerCore 2019-05-06 17:10:48 +00:00
cpp_headers Makefile: Add possibility to uninstall spdk. 2019-05-16 20:56:18 +00:00
env build: fix duplicate spdk.common.mk includes 2019-05-22 14:51:01 +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 examples: rename ioat perf tool to ioat_perf 2019-05-22 14:51:01 +00:00
iscsi_tgt test: always parse common script args 2019-05-24 05:36:46 +00:00
json_config test/nvmf: remove -p num_queues restrictions 2019-05-22 14:50:05 +00:00
lvol test/lvol: Add a case in usage and fix a typo 2019-05-01 18:46:59 +00:00
nvme build: fix duplicate spdk.common.mk includes 2019-05-22 14:51:01 +00:00
nvmf test: always parse common script args 2019-05-24 05:36:46 +00:00
ocf ocf: test: use all cache modes 2019-05-23 19:01:38 +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 spdkcli: Add support for raid devices 2019-05-09 19:36:35 +00:00
unit blobfs: don't flush a partial buffer with no sync pending 2019-05-27 06:45:41 +00:00
vhost test/vhost: windows scsi compliance test. 2019-05-24 23:47: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