]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix improper bluefs log size tracking in volume selector 45408/head
authorIgor Fedotov <ifedotov@suse.com>
Wed, 16 Mar 2022 09:44:33 +0000 (12:44 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Fri, 15 Jul 2022 16:49:45 +0000 (19:49 +0300)
Fixes: https://tracker.ceph.com/issues/54554
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
src/os/bluestore/BlueFS.cc

index e9c5d7af835ee9f41932c594ab33d749384154cd..f44347aa4c972ae3ba716ebcf990baa56055f571 100644 (file)
@@ -2409,6 +2409,9 @@ void BlueFS::_compact_log_async(std::unique_lock<ceph::mutex>& l)
 
   dout(10) << __func__ << " remove 0x" << std::hex << old_log_jump_to << std::dec
           << " of " << log_file->fnode.extents << dendl;
+
+  vselector->sub_usage(log_file->vselector_hint, log_file->fnode);
+
   uint64_t discarded = 0;
   mempool::bluefs::vector<bluefs_extent_t> old_extents;
   while (discarded < old_log_jump_to) {
@@ -2437,8 +2440,6 @@ void BlueFS::_compact_log_async(std::unique_lock<ceph::mutex>& l)
     ++from;
   }
 
-  vselector->sub_usage(log_file->vselector_hint, log_file->fnode);
-
   // clear the extents from old log file, they are added to new log
   log_file->fnode.clear_extents();
   // swap the log files. New log file is the log file now.