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

osd: replace object_info_t::operator=() with decode() #13938

Merged
merged 1 commit into from Mar 20, 2017

Conversation

Projects
None yet
3 participants
@jimmyway

jimmyway commented Mar 13, 2017

Signed-off-by: tang.jin tang.jin@istuary.com

@jimmyway

This comment has been minimized.

jimmyway commented Mar 14, 2017

@jimmyway

This comment has been minimized.

jimmyway commented Mar 15, 2017

@@ -4117,7 +4117,7 @@ struct object_info_t {
explicit object_info_t(bufferlist& bl) {
decode(bl);
}
object_info_t operator=(bufferlist& bl) {
object_info_t &operator=(bufferlist& bl) {

This comment has been minimized.

@tchaikov

tchaikov Mar 15, 2017

Contributor

i think we should remove this method instead. and use decode() when appropriate.

@dzafman what do you think?

This comment has been minimized.

@jimmyway

jimmyway Mar 16, 2017

@tchaikov May I delete this function directly or append '= delete' to the function declaration?

This comment has been minimized.

@tchaikov

tchaikov Mar 16, 2017

Contributor

as long as there is no users of operator=, i don't see why we cannot delete the default copy assignment operator.

This comment has been minimized.

@jimmyway

jimmyway Mar 16, 2017

OK, I will delete it.

This comment has been minimized.

@tchaikov

tchaikov Mar 16, 2017

Contributor

@jimmyway please try compile the tree first. PG::_scan_snaps() uses this function, that's why i suggested use decode() directly.

This comment has been minimized.

@tchaikov

tchaikov Mar 16, 2017

Contributor

and what is deleted in your change is not the default copy assignment operator. the one created by compiler by default is

object_info_t& operator=(object_info_t&)

This comment has been minimized.

@jimmyway

jimmyway Mar 16, 2017

sorry, I made mistakes, I will check it at first.

This comment has been minimized.

@jimmyway

jimmyway Mar 16, 2017

Do you mean delete 'operation=' member function, and replace it to decode() in PG::_scan_snaps() ?

@jimmyway jimmyway changed the title from osd: change return value from object to refs in order to eliminate extra object copy to osd: delete the default copy assignment operator Mar 16, 2017

@jimmyway jimmyway changed the title from osd: delete the default copy assignment operator to osd: delete the unused copy assignment operator, replace it to decode() Mar 16, 2017

@jimmyway jimmyway changed the title from osd: delete the unused copy assignment operator, replace it to decode() to osd: delete the copy assignment operator, replace it to decode() Mar 16, 2017

tang.jin
osd: delete the copy assignment operator, replace it to decode()
Signed-off-by: tang.jin <tang.jin@istuary.com>
@jimmyway

This comment has been minimized.

jimmyway commented Mar 17, 2017

@tchaikov tchaikov changed the title from osd: delete the copy assignment operator, replace it to decode() to osd: replace object_info_t::operator=() with decode() Mar 17, 2017

@yuriw yuriw merged commit 80a10ec into ceph:master Mar 20, 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

oritwas pushed a commit to oritwas/ceph that referenced this pull request Apr 21, 2017

TaskFinisher: use singleton SafeTimer and Finisher
Fix ceph#13938
Signed-off-by: Haomai Wang <haomai@xsky.com>

(cherry picked from commit dc6d6ce)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment