cdd089a8c5
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> |
||
---|---|---|
.. | ||
blobfs_internal.h | ||
blobfs.c | ||
Makefile | ||
tree.c | ||
tree.h |