numam-spdk/lib
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
..
bdev ocf: implement metadata probe 2019-06-18 07:11:21 +00:00
blob blobstore: Remove blob on blobstore load when required 2019-06-17 14:07:45 +00:00
blobfs blobfs: don't flush a partial buffer with no sync pending 2019-06-18 10:59:28 +00:00
conf string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
copy ioat: allocate device struct using regular calloc 2019-04-09 06:30:42 +00:00
env_dpdk env/dpdk: detach pci devices from EAL interrupt thread 2019-04-18 22:49:30 +00:00
event nvmf: add srq opts to get_nvmf_transports method. 2019-06-16 08:46:05 +00:00
ftl lib/ftl:fix scanbuild error in ftl_anm.c 2019-06-16 14:44:50 +00:00
ioat ioat: allocate device struct using regular calloc 2019-04-09 06:30:42 +00:00
iscsi iscsi: fix hang on high QD large reads 2019-06-16 14:44:50 +00:00
json json_util: add debug logs to spdk_json_decode_object function 2019-01-10 14:31:37 +00:00
jsonrpc jsonrpc: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
log app, log: clarify how to enable log flags 2019-03-29 02:35:48 +00:00
lvol lvol: Fix for lvol failed deletion flow 2019-04-02 19:23:22 +00:00
nbd nbd: optional nbd_device in start_nbd_disk 2019-04-04 08:35:50 +00:00
net net: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
notify notify: add notification library 2019-03-29 21:15:14 +00:00
nvme nvme_rdma: don't send split sgl requests inline. 2019-06-16 08:46:05 +00:00
nvmf nvmf: increase default max num qps to 128 2019-06-17 14:07:45 +00:00
reduce reduce: account for compressed buffers 2019-04-02 21:40:21 +00:00
rocksdb rocksdb: use C++ constructor/destructor for thread_ctx 2019-04-25 20:04:04 +00:00
rpc rpc: add get_spdk_version rpc method 2019-03-26 22:54:28 +00:00
scsi lib/scsi: Make spdk_scsi_dev_destruct asynchronous 2019-04-22 18:22:59 +00:00
sock sock: fix a uninitialized-variable error 2019-06-16 08:46:05 +00:00
thread thread: fix deadlock in spdk_for_each_thread error handling 2019-06-16 08:46:05 +00:00
trace lib/trace: add trace_record tool 2019-01-30 06:36:25 +00:00
ut_mock thread: Eliminate use of pthread_self and thread_ids 2019-01-15 16:53:12 +00:00
util lib/util/cpuset: add negate and xor 2019-04-09 17:40:24 +00:00
vhost rte_vhost: fix deadlock on rte_vhost_driver_unregister() 2019-06-17 14:07:45 +00:00
virtio virtio: zero-out virtqueue structures at init 2019-04-22 16:49:39 +00:00
Makefile notify: add notification library 2019-03-29 21:15:14 +00:00