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

tools/mdflush: Fix CI build failure #3936

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

xingfeng2510
Copy link
Contributor

@xingfeng2510 xingfeng2510 commented Apr 7, 2022

CI failed due to the following error (in mdflush.py, bio->bi_disk not found). I guess CI runtime env (such as kernel version) had changed in recent days.

error: no member named 'bi_disk' in 'struct bio'
     struct gendisk *bi_disk = bio->bi_disk;
                              ~~~  ^
1 error generated.
Traceback (most recent call last):
   File "/bcc/tools/mdflush.py", line 54, in <module>

Before kernel 4.14, stay the same, just use bio->bi_bdev->bd_disk.
Since kernel 4.14, macro bio_dev begin to appear, which refers to bio->bi_disk.
Since kernel 5.12, macro bio_dev has changed to bio->bi_bdev->bd_disk (bio->bi_bdev changed back). So, just use '#ifdef bio_dev' could not make the right choice under higher kernel version.

This patch try to fix this error. Please take a look. @davemarchevsky @yonghong-song

@davemarchevsky
Copy link
Collaborator

@xingfeng2510 thank you for fixing this! I really appreciate your recent CI fixes

@davemarchevsky davemarchevsky merged commit 7c02284 into iovisor:master Apr 7, 2022
@xingfeng2510
Copy link
Contributor Author

@davemarchevsky My pleasure, It's very kind of you.

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.

2 participants