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

mgr: drop repeated log info. and unnecessary write permission #15896

Merged
merged 3 commits into from Jun 27, 2017

Conversation

Projects
None yet
6 participants
@Yan-waller
Contributor

Yan-waller commented Jun 24, 2017

In the front of this file, __func__ has been added to dout_prefix as below:
#define dout_prefix *_dout << "mgr.server " << __func__ << " "

@Yan-waller Yan-waller changed the title from mgr: remove repeated function log and use readable errno strings to mgr: drop repeated log info. and unnecessary write permission Jun 24, 2017

@@ -176,7 +176,7 @@ bool DaemonServer::ms_verify_authorizer(Connection *con,
if (peer_type == CEPH_ENTITY_TYPE_OSD) {
Mutex::Locker l(lock);
s->osd_id = atoi(s->entity_name.get_id().c_str());
dout(10) << __func__ << " registering osd." << s->osd_id << " session "
dout(10) << " registering osd." << s->osd_id << " session "

This comment has been minimized.

@Liuchang0812

Liuchang0812 Jun 24, 2017

Contributor

NIT, #define dout_prefix *_dout << "mgr.server " << __func__ << " ", do not need the start space.

@@ -214,7 +214,7 @@ bool DaemonServer::ms_handle_reset(Connection *con)
}
session->put(); // SessionRef takes a ref
Mutex::Locker l(lock);
dout(10) << __func__ << " unregistering osd." << session->osd_id
dout(10) << " unregistering osd." << session->osd_id

This comment has been minimized.

@Liuchang0812

Liuchang0812 Jun 24, 2017

Contributor

ditto

mgr: remove repeated function log
In the front of this file, '__func__' has been added to dout_prefix as below:

"  #define dout_prefix *_dout << "mgr.server " << __func__ << " "    "

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
@Yan-waller

This comment has been minimized.

Contributor

Yan-waller commented Jun 24, 2017

@Liuchang0812 fixed it and thanks.

@jcsp

jcsp approved these changes Jun 24, 2017

@@ -451,7 +451,7 @@ bool DaemonServer::handle_command(MCommand *m)
con->mark_disposable();
}
dout(1) << "do_command r=" << r << " " << rs << dendl;
dout(1) << "do_command " << cpp_strerror(r) << " " << rs << dendl;

This comment has been minimized.

@tchaikov

tchaikov Jun 24, 2017

Contributor

would be better if we can s/do_command/handle_command/ .

This comment has been minimized.

@Yan-waller

Yan-waller Jun 24, 2017

Contributor

@tchaikov fixed it, thanks.

@@ -21,6 +21,7 @@
#include "common/Mutex.h"
#include "common/LogClient.h"
#include "common/errno.h"

This comment has been minimized.

@tchaikov

tchaikov Jun 25, 2017

Contributor

why would you include this file in the header file, but to use cpp_strerror() in .cc?

This comment has been minimized.

@Yan-waller

Yan-waller Jun 26, 2017

Contributor

@tchaikov , have no special reason, but it will really increase size of this header file, so I move it to the .cc file, thanks for your patient review.

Yan-waller added some commits Jun 24, 2017

mgr: use readable errno strings
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
mgr: drop unnecessary write permission
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>

@liewegas liewegas merged commit ba734f3 into ceph:master Jun 27, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
default Build finished.
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment