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

Projects
None yet
3 participants
@shun-s
Copy link
Contributor

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

@xiexingguo xiexingguo requested a review from dillaman Feb 23, 2018

@xiexingguo xiexingguo added the rbd label Feb 23, 2018

@dillaman dillaman added the feature label Feb 23, 2018

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

This comment has been minimized.

Copy link
@dillaman

dillaman Feb 23, 2018

Contributor

get_notify_op

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

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

This comment has been minimized.

Copy link
@dillaman

dillaman Feb 23, 2018

Contributor

Nit: GetNotifyOpVisitor

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

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

This comment has been minimized.

Copy link
@dillaman

dillaman Feb 23, 2018

Contributor

Nit: boost::static_visitor<NotifyOp>

apply_visitor(GetNotifyOPVisitor(), payload);
}


This comment has been minimized.

Copy link
@dillaman

dillaman Feb 23, 2018

Contributor

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: "

This comment has been minimized.

Copy link
@dillaman

dillaman Feb 23, 2018

Contributor

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;

This comment has been minimized.

Copy link
@dillaman

dillaman Feb 23, 2018

Contributor

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

rbd: output notifyOp request name when watching
  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 shun-s force-pushed the shun-s:wip-add-notify-name-print branch from 911a22e to db58878 Feb 24, 2018

@shun-s

This comment has been minimized.

Copy link
Contributor Author

commented Feb 24, 2018

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

@dillaman
Copy link
Contributor

left a comment

lgtm

@dillaman dillaman merged commit 64c215e into ceph:master Feb 27, 2018

4 of 5 checks passed

make check (arm64) make check failed
Details
Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details

@shun-s shun-s deleted the shun-s:wip-add-notify-name-print branch Apr 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.