Skip to content

Commit 64d9451

Browse files
committed
crimson/os/seastore: replace is_left_stable/is_right_stable with is_left_fresh/is_right_fresh
Signed-off-by: Myoungwon Oh <[email protected]>
1 parent c20a5d8 commit 64d9451

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/crimson/os/seastore/object_data_handler.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,8 @@ struct overwrite_plan_t {
640640

641641
// helper member
642642
extent_len_t block_size;
643-
bool is_left_stable;
644-
bool is_right_stable;
643+
bool is_left_fresh;
644+
bool is_right_fresh;
645645

646646
public:
647647
extent_len_t get_left_size() const {
@@ -691,8 +691,8 @@ struct overwrite_plan_t {
691691
<< ", left_operation=" << overwrite_plan.left_operation
692692
<< ", right_operation=" << overwrite_plan.right_operation
693693
<< ", block_size=" << overwrite_plan.block_size
694-
<< ", is_left_stable=" << overwrite_plan.is_left_stable
695-
<< ", is_right_stable=" << overwrite_plan.is_right_stable
694+
<< ", is_left_fresh=" << overwrite_plan.is_left_fresh
695+
<< ", is_right_fresh=" << overwrite_plan.is_right_fresh
696696
<< ")";
697697
}
698698

@@ -711,8 +711,8 @@ struct overwrite_plan_t {
711711
left_operation(overwrite_operation_t::UNKNOWN),
712712
right_operation(overwrite_operation_t::UNKNOWN),
713713
block_size(block_size),
714-
is_left_stable(pins.front()->is_stable()),
715-
is_right_stable(pins.back()->is_stable()) {
714+
is_left_fresh(!pins.front()->is_stable()),
715+
is_right_fresh(!pins.back()->is_stable()) {
716716
validate();
717717
evaluate_operations();
718718
assert(left_operation != overwrite_operation_t::UNKNOWN);
@@ -752,7 +752,7 @@ struct overwrite_plan_t {
752752
actual_write_size -= left_ext_size;
753753
left_ext_size = 0;
754754
left_operation = overwrite_operation_t::OVERWRITE_ZERO;
755-
} else if (!is_left_stable) {
755+
} else if (is_left_fresh) {
756756
aligned_data_size += left_ext_size;
757757
left_ext_size = 0;
758758
left_operation = overwrite_operation_t::MERGE_EXISTING;
@@ -762,7 +762,7 @@ struct overwrite_plan_t {
762762
actual_write_size -= right_ext_size;
763763
right_ext_size = 0;
764764
right_operation = overwrite_operation_t::OVERWRITE_ZERO;
765-
} else if (!is_right_stable) {
765+
} else if (is_right_fresh) {
766766
aligned_data_size += right_ext_size;
767767
right_ext_size = 0;
768768
right_operation = overwrite_operation_t::MERGE_EXISTING;

0 commit comments

Comments
 (0)