87d5d832 | 10-Apr-2020 |
Changpeng Liu <changpeng.liu@intel.com> |
blobfs: refactor cache_free_buffers()
cache_free_buffers() was only used in the file deletion and unload, and the file is also freed after that, so here we combine the cache free and file free toget
blobfs: refactor cache_free_buffers()
cache_free_buffers() was only used in the file deletion and unload, and the file is also freed after that, so here we combine the cache free and file free together and do the cache free in the cache thread.
Change-Id: I57e9a27c9a6467bcf6c85cd277db3b57e06c98e5 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1795 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
cdd089a8 | 24-May-2019 |
Jim Harris <james.r.harris@intel.com> |
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.
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>
show more ...
|
98ef63aa | 21-May-2019 |
Changpeng Liu <changpeng.liu@intel.com> |
UT/blobfs: add rename UT to blobfs_sync_ut
Change-Id: I17c34a02cbffce4078ef82cfc191394a7440ba52 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk
UT/blobfs: add rename UT to blobfs_sync_ut
Change-Id: I17c34a02cbffce4078ef82cfc191394a7440ba52 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455151 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|