]> 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>
Fri, 23 Jan 2026 03:07:49 +0000 (11:07 +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 706217ea42a92378be5267481fdc5263ad4deb6d..ce5b8cb8d88f0c4daccb6a7a7b5bb1761f5e45ec 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);