72b9af55 | 09-Feb-2020 |
Changpeng Liu <changpeng.liu@intel.com> |
blobfs: make cache_free_buffers() used for file deletion and blobfs unload
When there is no free cache buffers, we need to free some cache buffers based on very simple algorithm for now, when deleti
blobfs: make cache_free_buffers() used for file deletion and blobfs unload
When there is no free cache buffers, we need to free some cache buffers based on very simple algorithm for now, when deleting a file or unload the blobfs, there must no dirty caches, there is no cache buffers after calling spdk_tree_free_buffers(), so we will create another cache free buffers function which only used in file read/write path.
When testing blobfs with db_bench, there maybe multiple threads will call alloc_cache_memory_buffer() at same time, and spdk_fs_delete_file_async() maybe called at same time, and it may release file->tree and file structure without holding g_caches_lock, so here we will change the alloc_cache_memory_buffer() to hold the g_caches_lock while releasing the file cache buffers.
Fix issue #1133.
Change-Id: I115ff97113915630f539c3458c57116d9ff16179 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/668 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 ...
|
5adac19a | 12-Aug-2019 |
Changpeng Liu <changpeng.liu@intel.com> |
blobfs: return error to caller when loading a bs which isn't blobfs
Also release the IO channels with filesystem data structure.
Change-Id: I75a5d427fe4837ad7d85444d09ded9ab41e0ca8e Signed-off-by:
blobfs: return error to caller when loading a bs which isn't blobfs
Also release the IO channels with filesystem data structure.
Change-Id: I75a5d427fe4837ad7d85444d09ded9ab41e0ca8e Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464851 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
6c9b6abf | 11-Jun-2019 |
Changpeng Liu <changpeng.liu@intel.com> |
blobfs: make internal asynchronous APIs as public APIs
SPDK blobfs has asynchronous APIs defined in blobfs_internal.h file, as users may want to use them, so we remove them to the public .h file.
C
blobfs: make internal asynchronous APIs as public APIs
SPDK blobfs has asynchronous APIs defined in blobfs_internal.h file, as users may want to use them, so we remove them to the public .h file.
Change-Id: I1835d97060101f6315a73cb8638b15ff7e13ba54 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457547 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
bc1495b0 | 09-May-2019 |
Ziye Yang <ziye.yang@intel.com> |
blobfs: fix the semphore usage issue in spdk_file_read
We need to move sub_reads++ statement earlier. Otherwise if the read fails, the sem_wait(&channel->sem) call number is not correct.
Change-Id:
blobfs: fix the semphore usage issue in spdk_file_read
We need to move sub_reads++ statement earlier. Otherwise if the read fails, the sem_wait(&channel->sem) call number is not correct.
Change-Id: I05281a74bef78e4f80ce8d202b47849d1e6c2009 Signed-off-by: Ziye Yang <ziye.yang@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453788 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 ...
|
9602ade7 | 26-Apr-2019 |
Ziye Yang <ziye.yang@intel.com> |
blobfs: pass sync_req instead of file as the parameter
This avoids to get the first sync_req in the list, instead of make sure which sync_req we want to make it complete.
Also release the request e
blobfs: pass sync_req instead of file as the parameter
This avoids to get the first sync_req in the list, instead of make sure which sync_req we want to make it complete.
Also release the request early.
Change-Id: If6f9b2ab10f0a93e6c45088d33f2aa78d25f66cb Signed-off-by: Ziye Yang <ziye.yang@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452136 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
show more ...
|
fc45844c | 11-Apr-2019 |
Changpeng Liu <changpeng.liu@intel.com> |
blobfs: use wrapper function to free fs resources
Change-Id: Ia9c430c512e8c9a3195e2bfb28adb0526174070a Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io
blobfs: use wrapper function to free fs resources
Change-Id: Ia9c430c512e8c9a3195e2bfb28adb0526174070a Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450982 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
1bc959f2 | 11-Apr-2019 |
Changpeng Liu <changpeng.liu@intel.com> |
blobfs: fix up the wrong usage of delete API
blob_delete_cb() takes spdk_fs_request as the input parameter.
Change-Id: Ie6150e7d31d187296a448e82784e2ac2fecfe52c Signed-off-by: Changpeng Liu <changp
blobfs: fix up the wrong usage of delete API
blob_delete_cb() takes spdk_fs_request as the input parameter.
Change-Id: Ie6150e7d31d187296a448e82784e2ac2fecfe52c Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450895 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 ...
|