mds: use variable g_ceph_context directly in MDSAuthCaps#50874
mds: use variable g_ceph_context directly in MDSAuthCaps#50874rishabh-d-dave merged 1 commit intoceph:mainfrom
Conversation
|
the part of code looks much cleaner with this change |
|
@rishabh-d-dave please pick this up in your next run. |
Yes. |
b4fda46 to
9fd5e81
Compare
|
No changes, just a rebase. |
rzarzynski
left a comment
There was a problem hiding this comment.
The tiny mon change LGTM.
I hasn't checked the implicit assumption MDSAuthCaps isn't / won't be used in libraries.
| } else if (type == "mds") { | ||
| MDSAuthCaps mdscap; | ||
| if (!mdscap.parse(g_ceph_context, caps, out)) { | ||
| if (!mdscap.parse(caps, out)) { |
There was a problem hiding this comment.
From the mon's perspective this should be fine.
Just a note:
It is fine to use dout and derr in daemons, but in library code, you must use ldout and lderr, and pass in your own CephContext object. The compiler will enforce this restriction.
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
@rishabh-d-dave please rebase and do the needful. |
Yes, I am on it. Due to teuthology infra issues, testing wasn't complete but it is now. Will review results once more and merge this PR. |
Variable g_ceph_context is global, therefore use it directly instead of passing it as a parameter to method. Signed-off-by: Rishabh Dave <ridave@redhat.com>
9fd5e81 to
64c2712
Compare
Since PR ceph#50874 has been merged, this method can do the exact same job in much lesser code. Also since we are here, let's rename variable "type" to "entity". Signed-off-by: Rishabh Dave <ridave@redhat.com>
Since PR ceph#50874 has been merged, this method can do the exact same job in much lesser code. Also since we are here, let's rename variable "type" to "entity". Signed-off-by: Rishabh Dave <ridave@redhat.com>
Since PR ceph#50874 has been merged, this method can do the exact same job in much lesser code. Also since we are here, let's rename variable "type" to "entity". Signed-off-by: Rishabh Dave <ridave@redhat.com>
Since PR ceph#50874 has been merged, this method can do the exact same job in much lesser code. Also since we are here, let's rename variable "type" to "entity". Signed-off-by: Rishabh Dave <ridave@redhat.com>
Since PR ceph#50874 has been merged, this method can do the exact same job in much lesser code. Also since we are here, let's rename variable "type" to "entity". Signed-off-by: Rishabh Dave <ridave@redhat.com>
Since PR ceph#50874 has been merged, this method can do the exact same job in much lesser code. Also since we are here, let's rename variable "type" to "entity". Signed-off-by: Rishabh Dave <ridave@redhat.com>
Variable g_ceph_context is global, therefore use it directly instead of
passing it as a parameter to method.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows