]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/seastore_types: define rewriting transactions
authorXuehan Xu <xuxuehan@qianxin.com>
Wed, 19 Nov 2025 10:21:52 +0000 (18:21 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Tue, 10 Feb 2026 02:54:42 +0000 (10:54 +0800)
These are the transactions that only rewrite extents and mutation lba
nodes, e.g. TRIM_DIRTY and CLEANER transactions

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/seastore_types.h

index 91197c040d7b2dab427b52f3224e3d6be6473cb4..da2b265236f150ecb586e56091e6395a58e15c13 100644 (file)
@@ -2262,6 +2262,12 @@ constexpr bool is_background_transaction(transaction_type_t type) {
           type < transaction_type_t::MAX);
 }
 
+constexpr bool is_rewrite_transaction(transaction_type_t type) {
+  return type == transaction_type_t::TRIM_DIRTY ||
+    type == transaction_type_t::CLEANER_MAIN ||
+    type == transaction_type_t::CLEANER_COLD;
+}
+
 constexpr bool is_trim_transaction(transaction_type_t type) {
   return (type == transaction_type_t::TRIM_DIRTY ||
       type == transaction_type_t::TRIM_ALLOC);