Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/osd_types: remove backlog type for pg_log_entry_t #20887

Merged
merged 1 commit into from
Mar 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/osd/osd_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3307,7 +3307,7 @@ struct pg_log_entry_t {
MODIFY = 1, // some unspecified modification (but not *all* modifications)
CLONE = 2, // cloned object from head
DELETE = 3, // deleted object
BACKLOG = 4, // event invented by generate_backlog [deprecated]
//BACKLOG = 4, // event invented by generate_backlog [obsolete]
LOST_REVERT = 5, // lost new version, revert to an older version.
LOST_DELETE = 6, // lost new version, revert to no object (deleted).
LOST_MARK = 7, // lost new version, now EIO
Expand All @@ -3325,8 +3325,6 @@ struct pg_log_entry_t {
return "clone";
case DELETE:
return "delete";
case BACKLOG:
return "backlog";
case LOST_REVERT:
return "l_revert";
case LOST_DELETE:
Expand Down Expand Up @@ -3380,7 +3378,6 @@ struct pg_log_entry_t {
bool is_modify() const { return op == MODIFY; }
bool is_promote() const { return op == PROMOTE; }
bool is_clean() const { return op == CLEAN; }
bool is_backlog() const { return op == BACKLOG; }
bool is_lost_revert() const { return op == LOST_REVERT; }
bool is_lost_delete() const { return op == LOST_DELETE; }
bool is_lost_mark() const { return op == LOST_MARK; }
Expand All @@ -3389,7 +3386,7 @@ struct pg_log_entry_t {
bool is_update() const {
return
is_clone() || is_modify() || is_promote() || is_clean() ||
is_backlog() || is_lost_revert() || is_lost_mark();
is_lost_revert() || is_lost_mark();
}
bool is_delete() const {
return op == DELETE || op == LOST_DELETE;
Expand Down Expand Up @@ -3903,9 +3900,6 @@ class pg_missing_set : public pg_missing_const_i {
rmissing.erase((missing_it->second).need.version);
(missing_it->second).need = e.version; // leave .have unchanged.
missing_it->second.set_delete(e.is_delete());
} else if (e.is_backlog()) {
// May not have prior version
assert(0 == "these don't exist anymore");
} else {
// not missing, we must have prior_version (if any)
assert(!is_missing_divergent_item);
Expand Down
14 changes: 0 additions & 14 deletions src/test/osd/types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -829,20 +829,6 @@ TEST(pg_missing_t, add_next_event)
EXPECT_EQ(1U, missing.get_rmissing().size());
}

// obsolete (BACKLOG)
{
pg_missing_t missing;
pg_log_entry_t e = sample_e;

e.op = pg_log_entry_t::BACKLOG;
EXPECT_TRUE(e.is_backlog());
EXPECT_TRUE(e.object_is_indexed());
EXPECT_FALSE(e.reqid_is_indexed());
EXPECT_FALSE(missing.is_missing(oid));
PrCtl unset_dumpable;
EXPECT_DEATH(missing.add_next_event(e), "");
}

// adding a DELETE matching an existing event
{
pg_missing_t missing;
Expand Down