]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/.../pg_interval_interrupt_condition: allow specifying epoch
authorSamuel Just <sjust@redhat.com>
Thu, 4 Jul 2024 00:58:42 +0000 (00:58 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 25 Jul 2024 07:53:40 +0000 (10:53 +0300)
This allows a with_interruption caller to specify an epoch other than
the current pg epoch.  Doing so is important if the operation in question
was initiated prior to continuation which invokes with_interruption and
a map advance may have occured in the mean time.

Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 7a1b91ac5e030c490279d8140e568d6d08aba3c8)

src/crimson/osd/pg_interval_interrupt_condition.cc
src/crimson/osd/pg_interval_interrupt_condition.h

index b72044d4e57e3babfcdbe812e775609830ff0140..62a0988aa8c00ae2bbbe0afb8d8828b91954b532 100644 (file)
@@ -15,6 +15,8 @@ interrupt_cond<crimson::osd::IOInterruptCondition>;
 
 namespace crimson::osd {
 
+IOInterruptCondition::IOInterruptCondition(Ref<PG>& pg, epoch_t e)
+  : pg(pg), e(e) {}
 IOInterruptCondition::IOInterruptCondition(Ref<PG>& pg)
   : pg(pg), e(pg->get_osdmap_epoch()) {}
 
index a3a0a1edbcf5aa90298199ba9f8461a42c9bcf78..4ffb04740c656a800b3a58df7f2c14014e5cadb9 100644 (file)
@@ -14,6 +14,7 @@ class PG;
 
 class IOInterruptCondition {
 public:
+  IOInterruptCondition(Ref<PG>& pg, epoch_t e);
   IOInterruptCondition(Ref<PG>& pg);
   ~IOInterruptCondition();