Skip to content

Commit

Permalink
crimson/os/seastore: replace is_left_stable/is_right_stable with is_l…
Browse files Browse the repository at this point in the history
…eft_fresh/is_right_fresh

Signed-off-by: Myoungwon Oh <[email protected]>
  • Loading branch information
myoungwon committed May 14, 2024
1 parent c20a5d8 commit 64d9451
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/crimson/os/seastore/object_data_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ struct overwrite_plan_t {

// helper member
extent_len_t block_size;
bool is_left_stable;
bool is_right_stable;
bool is_left_fresh;
bool is_right_fresh;

public:
extent_len_t get_left_size() const {
Expand Down Expand Up @@ -691,8 +691,8 @@ struct overwrite_plan_t {
<< ", left_operation=" << overwrite_plan.left_operation
<< ", right_operation=" << overwrite_plan.right_operation
<< ", block_size=" << overwrite_plan.block_size
<< ", is_left_stable=" << overwrite_plan.is_left_stable
<< ", is_right_stable=" << overwrite_plan.is_right_stable
<< ", is_left_fresh=" << overwrite_plan.is_left_fresh
<< ", is_right_fresh=" << overwrite_plan.is_right_fresh
<< ")";
}

Expand All @@ -711,8 +711,8 @@ struct overwrite_plan_t {
left_operation(overwrite_operation_t::UNKNOWN),
right_operation(overwrite_operation_t::UNKNOWN),
block_size(block_size),
is_left_stable(pins.front()->is_stable()),
is_right_stable(pins.back()->is_stable()) {
is_left_fresh(!pins.front()->is_stable()),
is_right_fresh(!pins.back()->is_stable()) {
validate();
evaluate_operations();
assert(left_operation != overwrite_operation_t::UNKNOWN);
Expand Down Expand Up @@ -752,7 +752,7 @@ struct overwrite_plan_t {
actual_write_size -= left_ext_size;
left_ext_size = 0;
left_operation = overwrite_operation_t::OVERWRITE_ZERO;
} else if (!is_left_stable) {
} else if (is_left_fresh) {
aligned_data_size += left_ext_size;
left_ext_size = 0;
left_operation = overwrite_operation_t::MERGE_EXISTING;
Expand All @@ -762,7 +762,7 @@ struct overwrite_plan_t {
actual_write_size -= right_ext_size;
right_ext_size = 0;
right_operation = overwrite_operation_t::OVERWRITE_ZERO;
} else if (!is_right_stable) {
} else if (is_right_fresh) {
aligned_data_size += right_ext_size;
right_ext_size = 0;
right_operation = overwrite_operation_t::MERGE_EXISTING;
Expand Down

0 comments on commit 64d9451

Please sign in to comment.