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

rbd: output notifyOp request name when watching #20551

Merged
merged 1 commit into from Feb 27, 2018

Conversation

shun-s
Copy link
Contributor

@shun-s shun-s commented Feb 23, 2018

output notifyOp request name when watching,
which is more easier to dentify what happend.

Signed-off-by: shun-s song.shun3@zte.com.cn

@@ -339,6 +339,7 @@ struct NotifyMessage {
void encode(bufferlist& bl) const;
void decode(bufferlist::iterator& it);
void dump(Formatter *f) const;
NotifyOp getOp() const;

Choose a reason for hiding this comment

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

get_notify_op

@@ -21,6 +21,14 @@ class CheckForRefreshVisitor : public boost::static_visitor<bool> {
}
};

class GetNotifyOPVisitor : public boost::static_visitor<int> {

Choose a reason for hiding this comment

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

Nit: GetNotifyOpVisitor

@@ -21,6 +21,14 @@ class CheckForRefreshVisitor : public boost::static_visitor<bool> {
}
};

class GetNotifyOPVisitor : public boost::static_visitor<int> {

Choose a reason for hiding this comment

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

Nit: boost::static_visitor<NotifyOp>

apply_visitor(GetNotifyOPVisitor(), payload);
}


Choose a reason for hiding this comment

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

Nit: remove extra blank line

bufferlist::iterator iter = bl.begin();
notify_message.decode(iter);
} catch (const buffer::error &err) {
std::cout << __func__ << " error decoding image notification: "

Choose a reason for hiding this comment

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

Nit: std::cerr << "rbd: failed to decode image notification" << std::endl;

} catch (const buffer::error &err) {
std::cout << __func__ << " error decoding image notification: "
<< err.what() << std::endl;
return;

Choose a reason for hiding this comment

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

... no need to return since it will default to unknown payload.

  output notifyOp request name when watching,
  which is more easier to dentify what happend.

Signed-off-by: shun-s <song.shun3@zte.com.cn>
@shun-s
Copy link
Contributor Author

shun-s commented Feb 24, 2018

@dillaman all your requirements are done, please take a look again.

Copy link

@dillaman dillaman left a comment

Choose a reason for hiding this comment

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

lgtm

@dillaman dillaman merged commit 64c215e into ceph:master Feb 27, 2018
@shun-s shun-s deleted the wip-add-notify-name-print branch April 7, 2018 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants