diff --git a/cmake/modules/Buildpmem.cmake b/cmake/modules/Buildpmem.cmake index 7068db85e88..6db9754cb95 100644 --- a/cmake/modules/Buildpmem.cmake +++ b/cmake/modules/Buildpmem.cmake @@ -9,7 +9,7 @@ function(build_pmem) set(source_dir_args SOURCE_DIR ${CMAKE_BINARY_DIR}/src/pmdk GIT_REPOSITORY https://github.com/ceph/pmdk.git - GIT_TAG "1.7" + GIT_TAG "1.10" GIT_SHALLOW TRUE GIT_CONFIG advice.detachedHead=false) endif() diff --git a/make-dist b/make-dist index e4a78dafd70..91fb4f85375 100755 --- a/make-dist +++ b/make-dist @@ -186,8 +186,8 @@ download_boost $boost_version 953db31e016db7bb207f11432bef7df100516eeb746843fa04 download_liburing 0.7 8e2842cfe947f3a443af301bdd6d034455536c38a455c7a700d0c1ad165a7543 \ https://github.com/axboe/liburing/archive \ https://git.kernel.dk/cgit/liburing/snapshot -pmdk_version=1.7 -download_pmdk $pmdk_version 865ce1b422bc83109cb4a63dcff8fd1077eea3617e668faf6a043208d8be03ca \ +pmdk_version=1.10 +download_pmdk $pmdk_version 08dafcf94db5ac13fac9139c92225d9aa5f3724ea74beee4e6ca19a01a2eb20c \ https://github.com/pmem/pmdk/releases/download/$pmdk_version build_dashboard_frontend generate_rook_ceph_client diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 72ff9ac9cd1..54d89e29060 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -534,7 +534,7 @@ if(WITH_BLUESTORE_PMEM OR WITH_RBD_RWL) if(WITH_RBD_RWL) list(APPEND pmem_COMPONENTS pmemobj) endif() - find_package(pmem 1.7 REQUIRED COMPONENTS ${pmem_COMPONENTS}) + find_package(pmem 1.10 REQUIRED COMPONENTS ${pmem_COMPONENTS}) else() include(Buildpmem) build_pmem() diff --git a/src/librbd/cache/pwl/rwl/WriteLog.cc b/src/librbd/cache/pwl/rwl/WriteLog.cc index 4f563d739da..a9b5e708b9e 100644 --- a/src/librbd/cache/pwl/rwl/WriteLog.cc +++ b/src/librbd/cache/pwl/rwl/WriteLog.cc @@ -897,6 +897,12 @@ void WriteLog::reserve_cache(C_BlockIORequestT *req, << *req << dendl; alloc_succeeds = false; no_space = true; /* Entries need to be retired */ + + if (this->m_free_log_entries == this->m_total_log_entries - 1) { + /* When the cache is empty, there is still no space to allocate. + * Defragment. */ + pmemobj_defrag(m_log_pool, NULL, 0, NULL); + } break; } else { buffer.allocated = true;