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

librbd: sync flush should re-use existing async flush logic #18403

Merged
merged 2 commits into from Oct 23, 2017

Conversation

dillaman
Copy link

No description provided.

@dillaman dillaman changed the title librbd: sync flush should re-used existing async flush logic librbd: sync flush should re-use existing async flush logic Oct 19, 2017
}
r = ctx.wait();

ictx->perfcounter->inc(l_librbd_flush);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dillaman Are you going to leave "flush" counter unused?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, in "qa/workunits/rbd/test_admin_socket.sh" we have a test that checks "flush" perfcounter is updated after "flush" admin socket command.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah -- I thought it was already covered here [1] but it's for AIO flush. I'll combine them in the next push.

[1]

image_ctx.perfcounter->inc(l_librbd_aio_flush);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... consolidated

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
@dillaman dillaman force-pushed the wip-librbd-flush branch 2 times, most recently from f2d1ac2 to 8ad2c3b Compare October 23, 2017 00:44
int r = image.flush();
if (r < 0) {
std::cerr << "rbd: failed to flush: " << cpp_strerror(r) << std::endl;
return r;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this to be fatal? E.g. previously running bench read against exclusively mapped image would succeed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tweaked it to be fatal for write/read-write tests and skipped on the final flush for read-only tests

@trociny
Copy link
Contributor

trociny commented Oct 23, 2017

@dillaman qa/workunits/rbd/journal.sh needs update. Namely, test_rbd_journal(), rbd journal inspect test, which counts journal entries after rbd bench-write and fails now because of 2 new "AioFlush" entries.

For the new read-based bench tests, flushing prior to the start of the test
will result in the exclusive lock being acquired and the object map being
utilized.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
@dillaman
Copy link
Author

@trociny updated

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@trociny trociny merged commit 1100a00 into ceph:master Oct 23, 2017
@dillaman dillaman deleted the wip-librbd-flush branch October 23, 2017 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants