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

osdc/Journaler: avoid executing on_safe contexts prematurely #15240

Merged
merged 2 commits into from Jun 1, 2017

Conversation

Projects
None yet
3 participants
@ukernel
Member

ukernel commented May 23, 2017

Journaler::_do_flush() can skip flushing some data when prezered
journal space isn't enough. Before updating Journaler::next_safe_pos,
we need to check if Journaler::_do_flush() has flushed enough data.

Fixes: http://tracker.ceph.com/issues/20055
Signed-off-by: "Yan, Zheng" zyan@redhat.com

@@ -568,7 +568,7 @@ uint64_t Journaler::append_entry(bufferlist& bl)
ldout(cct, 10) << " flushing completed object(s) (su " << su << " wro "
<< write_obj << " flo " << flush_obj << ")" << dendl;
_do_flush(write_buf.length() - write_off);
if (write_off) {
if (write_off && write_buf.length() <= wrote) {

This comment has been minimized.

@gregsfortytwo

gregsfortytwo May 23, 2017

Member

I think you're trying to make sure we aren't getting partway into the written data with this update? But the conditional is pretty obtuse about that; pease add a comment.

Also, does this actually solve the problem? Seems like when adding entry N+1, we can split the commit of entry N. It'd be a lot more obvious to just look at which object we're actually flushing and move the next_safe_pointer to the end of that.

ukernel added some commits May 23, 2017

osdc/Journaler: avoid executing on_safe contexts prematurely
Journaler::_do_flush() can skip flushing some data when prezered
journal space isn't enough. Before updating Journaler::next_safe_pos,
we need to check if Journaler::_do_flush() has flushed enough data.

Fixes: http://tracker.ceph.com/issues/20055
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
osdc/Journaler: use waitfor_safe map to find journal entry boundaries
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
@ukernel

This comment has been minimized.

Member

ukernel commented May 24, 2017

updated

@gregsfortytwo

Reviewed-by: Greg Farnum gfarnum@redhat.com

@gregsfortytwo gregsfortytwo removed their assignment Jun 1, 2017

@jcsp jcsp merged commit b267806 into ceph:master Jun 1, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@ukernel ukernel deleted the ukernel:wip-20055 branch Jun 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment