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

Fixes bio{snoop,top} on 4.10 #889

Merged
merged 1 commit into from
Jan 9, 2017
Merged

Conversation

totally
Copy link

@totally totally commented Jan 7, 2017

This commit fixes #888 by making sure REQ_OP_SHIFT (removed in 4.10) is defined before evaluating, and adding code to handle 4.10's use of REQ_OP_WRITE.

biosnoop.py and biotop.py both check whether the op is a read or write, and now use more or less the same copy pasta code to do it.

Tested on 4.10-rc2.

#else
if ((req->cmd_flags >> REQ_OP_SHIFT) == REQ_OP_WRITE) {
data.rwflag = !!(req->cmd_flags & REQ_OP_WRITE);
Copy link
Member

Choose a reason for hiding this comment

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

doesn't look right. It probably should be (req->cmd_flags & REQ_OP_MASK) == REQ_OP_WRITE

This commit fixes iovisor#888.  The 2 scripts run the same check, and now run
basically the same code to do it.

Tested on 4.10-rc2.
@totally
Copy link
Author

totally commented Jan 8, 2017

Thanks @4ast, updated.

@4ast
Copy link
Member

4ast commented Jan 8, 2017

[buildbot, ok to test]
LGTM
cc @brendangregg

@4ast 4ast merged commit a043d5c into iovisor:master Jan 9, 2017
@brendangregg
Copy link
Member

thanks @totally , @4ast !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

biosnoop.py and biotop.py preprocessor fails on kernel 4.10 due to undefined REQ_OP_SHIFT
3 participants