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

mds: remove unused EFragment::OP_ONESHOT #11887

Merged
merged 1 commit into from Nov 15, 2016
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
3 changes: 1 addition & 2 deletions src/mds/events/EFragment.h
Expand Up @@ -49,8 +49,7 @@ class EFragment : public LogEvent {
OP_PREPARE = 1,
OP_COMMIT = 2,
OP_ROLLBACK = 3,
OP_FINISH = 4, // finish deleting orphan dirfrags
OP_ONESHOT = 5, // (legacy) PREPARE+COMMIT
OP_FINISH = 4 // finish deleting orphan dirfrags
};
static const char *op_name(int o) {
switch (o) {
Expand Down
5 changes: 1 addition & 4 deletions src/mds/journal.cc
Expand Up @@ -2745,8 +2745,7 @@ void EFragment::replay(MDSRank *mds)
switch (op) {
case OP_PREPARE:
mds->mdcache->add_uncommitted_fragment(dirfrag_t(ino, basefrag), bits, orig_frags, _segment, &rollback);
// fall-thru
case OP_ONESHOT:

if (in)
mds->mdcache->adjust_dir_fragments(in, basefrag, bits, resultfrags, waiters, true);
break;
Expand Down Expand Up @@ -2798,8 +2797,6 @@ void EFragment::decode(bufferlist::iterator &bl) {
::decode(stamp, bl);
if (struct_v >= 3)
::decode(op, bl);
else
op = OP_ONESHOT;
::decode(ino, bl);
::decode(basefrag, bl);
::decode(bits, bl);
Expand Down