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

os/bluestore: fix offset bug in _do_write_small. #11030

Merged
merged 2 commits into from Sep 13, 2016

Conversation

amoxic
Copy link
Contributor

@amoxic amoxic commented Sep 9, 2016

The statement "if (ep->logical_offset + b->get_blob().get_ondisk_length() <= offset)" which try to judge if the writing offset is in the current Blob may be wrong.

Signed-off-by: feng yu amoxic@126.com

  The statement "if (ep->logical_offset + b->get_blob().get_ondisk_length() <= offset)" which try to judge if the writing offset is in the current Blob may be wrong.

Signed-off-by: feng yu amoxic@126.com
@@ -6964,7 +6964,7 @@ void BlueStore::_do_write_small(
if (ep != o->extent_map.extent_map.begin()) {
--ep;
b = ep->blob;
if (ep->logical_offset + b->get_blob().get_ondisk_length() <= offset) {
if ((ep->logical_offset - ep->blob_offset) + b->get_blob().get_ondisk_length() <= offset) {
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for parentheses.
Have you run ceph_test_objectstore for your patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran ceph_test_objectstore(only BlueStore), here is the result.

[----------] Global test environment tear-down
[==========] 61 tests from 1 test case ran. (9295011 ms total)
[ PASSED ] 61 tests.

@liewegas liewegas changed the title os/bluestore: Something may be wrong with _do_write_small. os/bluestore: fix offset bug in _do_write_small. Sep 9, 2016
Signed-off-by: feng yu amoxic@126.com
@liewegas liewegas merged commit fd6b1cc into ceph:master Sep 13, 2016
@amoxic amoxic deleted the amoxic-wip-fix-do-write-small branch September 14, 2016 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants