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

optimize clone write path if object-map is enabled #6403

Merged
merged 2 commits into from Nov 9, 2015

Conversation

xinxinsh
Copy link

Fixes : #13500

Signed-off-by: xinxin shu xinxin.shu@intel.com

@dillaman
Copy link

@xinxinsh I would initialize your "object exists" variable (named with m_ prefix) within send_pre(). Then the tricky part if that you only want to jump to the LIBRBD_AIO_WRITE_GUARD state if you would have needed to guard the write (i.e. AioRemove will only force a guarded write if you have snapshots).

@xinxinsh xinxinsh force-pushed the wip-13500 branch 2 times, most recently from b36f390 to 89ce1da Compare October 30, 2015 08:08
@xinxinsh xinxinsh force-pushed the wip-13500 branch 2 times, most recently from 46c200a to 6338253 Compare October 30, 2015 09:56
@dillaman dillaman self-assigned this Nov 2, 2015
m_state = LIBRBD_AIO_WRITE_GUARD;
complete(-ENOENT);
} else {
m_state = LIBRBD_AIO_WRITE_FLAT;
Copy link

Choose a reason for hiding this comment

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

Now that I think about this more, perhaps we should keep the guarded write in the case just to be extra-safe. That would allow you to combine this block with the "m_object_exists" condition block.

@xinxinsh xinxinsh force-pushed the wip-13500 branch 2 times, most recently from bdde6eb to 2430b0f Compare November 4, 2015 07:20
@xinxinsh
Copy link
Author

xinxinsh commented Nov 4, 2015

@dillaman , updated, help review

xinxin shu added 2 commits November 6, 2015 09:02
Fixes : ceph#13500

Signed-off-by: xinxin shu <xinxin.shu@intel.com>
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
@xinxinsh xinxinsh force-pushed the wip-13500 branch 2 times, most recently from 3c78d7d to 33aabf2 Compare November 6, 2015 02:04
@xinxinsh
Copy link
Author

xinxinsh commented Nov 6, 2015

@dillaman , updated

@dillaman
Copy link

dillaman commented Nov 6, 2015

LGTM -- I'll run it through tests tomorrow

dillaman pushed a commit that referenced this pull request Nov 9, 2015
optimize clone write path if object-map is enabled

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
@dillaman dillaman merged commit d167489 into ceph:master Nov 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants