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

Partial organization of mds/ header sections #11959

Merged
merged 3 commits into from Nov 22, 2016

Conversation

batrick
Copy link
Member

@batrick batrick commented Nov 14, 2016

As we discussed in the CephFS summit, this is a simple organization of the class members in the mds/ headers following our C++ guidelines. The idea is to improve readability and understanding of each class' purpose.

I'll continue incrementally working on this as I find spare time/inclination.

Copy link
Member

@gregsfortytwo gregsfortytwo left a comment

Choose a reason for hiding this comment

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

Looks good to me, just a few questions.


private:
void _notify_mdsmap(MDSMap const *mdsmap);
void _send();
Copy link
Member

Choose a reason for hiding this comment

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

Did you move these first two private functions for a reason? It kind of looks like they go with C_MDS_BeaconSender to me?
...oh, because we're supposed to expose functions prior to members? Is that going to be feasible with our header-implemented functions?

Copy link
Member Author

Choose a reason for hiding this comment

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

...oh, because we're supposed to expose functions prior to members?

That's what the style guide says but I'm not committed to that part of the style doc if we dislike it.

Is that going to be feasible with our header-implemented functions?

I don't see why not?

Copy link
Member

Choose a reason for hiding this comment

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

The allowed order of declaration versus usage is annoying. I don't know the actual rules anymore and it seems to vary based on the compiler/settings.

void operator delete(void *p) {
pool.free(p);
}
const Capability& operator=(const Capability& other); // no copying
Copy link
Member

Choose a reason for hiding this comment

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

Do the code style rules really require us to separate this and the copy constructor when disabling both? (Or does it perhaps only allow us to use better solutions?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes but I'm open to doing things differently. I personally think putting operators with the cons/des makes sense but the guide doesn't say anything about that.

@gregsfortytwo
Copy link
Member

Might as well run it through a test just in case though.

@ghost
Copy link

ghost commented Nov 17, 2016

jenkins test this please (eio ignored in master)

This amends the code to follow our C++ style guidelines with the goal of
increasing header readability.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This amends the code to follow our C++ style guidelines with the goal of
increasing header readability.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This amends the code to follow our C++ style guidelines with the goal of
increasing header readability.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Copy link
Member

@gregsfortytwo gregsfortytwo left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Greg Farnum gfarnum@redhat.com

@gregsfortytwo
Copy link
Member

@jcsp, any thoughts before we merge this? (Don't want it to get stale!)

@jcsp jcsp merged commit 66feecc into ceph:master Nov 22, 2016
@jcsp
Copy link
Contributor

jcsp commented Nov 22, 2016

No complaints here!

@batrick batrick deleted the mds-header-prot-org branch November 23, 2016 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants