Skip to content

Commit ddc5594

Browse files
committed
mds: skip second wait_for_safe
Now that we only trim up to the segment created for the flush, this second wait should no longer be necessary. Signed-off-by: Patrick Donnelly <[email protected]>
1 parent 66478ab commit ddc5594

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/mds/MDSRank.cc

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -111,33 +111,6 @@ class C_Flush_Journal : public MDSInternalContext {
111111
mdlog->wait_for_safe(new MDSInternalContextWrapper(mds, ctx));
112112
}
113113

114-
void handle_flush_mdlog(int r) {
115-
dout(20) << __func__ << ": r=" << r << dendl;
116-
117-
if (r != 0) {
118-
*ss << "Error " << r << " (" << cpp_strerror(r) << ") while flushing journal";
119-
complete(r);
120-
return;
121-
}
122-
123-
clear_mdlog();
124-
}
125-
126-
void clear_mdlog() {
127-
dout(20) << __func__ << dendl;
128-
129-
Context *ctx = new LambdaContext([this](int r) {
130-
handle_clear_mdlog(r);
131-
});
132-
133-
// Because we may not be the last wait_for_safe context on MDLog,
134-
// and subsequent contexts might wake up in the middle of our
135-
// later trim_all and interfere with expiry (by e.g. marking
136-
// dirs/dentries dirty on previous log segments), we run a second
137-
// wait_for_safe here. See #10368
138-
mdlog->wait_for_safe(new MDSInternalContextWrapper(mds, ctx));
139-
}
140-
141114
void handle_clear_mdlog(int r) {
142115
dout(20) << __func__ << ": r=" << r << dendl;
143116

0 commit comments

Comments
 (0)