From 9052f3e370867eceefcdcd653bd3c3e2e7a11d55 Mon Sep 17 00:00:00 2001 From: Pritha Srivastava Date: Mon, 28 Aug 2023 17:13:38 +0530 Subject: [PATCH] rgw/cache: fixing free space calcuation when data is deleted from the cache backend. Signed-off-by: Pritha Srivastava --- src/rgw/rgw_ssd_driver.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rgw/rgw_ssd_driver.cc b/src/rgw/rgw_ssd_driver.cc index 48029aadeaf..5a44ef4efa2 100644 --- a/src/rgw/rgw_ssd_driver.cc +++ b/src/rgw/rgw_ssd_driver.cc @@ -238,6 +238,9 @@ int SSDDriver::delete_data(const DoutPrefixProvider* dpp, const::std::string& ke return -EIO; } + efs::space_info space = efs::space(partition_info.location); + this->free_space = space.available; + return remove_entry(dpp, key); } -- 2.39.5