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

fix build failed in old ubuntu #347

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

hongyuntw
Copy link

If (void)rq is not added during compilation, an unused warning will appear. However, in the src/configure-tests/feature-tests/Makefile, the Werror flag is included, causing the feature not to be tested. Consequently, this leads to the module using unexpected parameters for blk_alloc_queue.

Currently, the issue is observed in older kernel versions, such as Fedora 30 (5.6.13-100.fc30.x86_64) and Ubuntu 16 (4.4.0-186-generic).

@Swistusmen
Copy link
Collaborator

Thank you for this contribution, can you please tell how did you detect this? Are there any signs from the site of given OSes that such an error occurs? We aren't testing on fedora at all, and if it comes to ubuntu we put bigger pressure on newer ones

@hongyuntw
Copy link
Author

Hi, I discovered this issue during simple testing to ensure that this module functions correctly on different operating systems. I didn't observe any specific indicators. Thank you.

@hongyuntw
Copy link
Author

hongyuntw commented Jan 23, 2024

In addition, I later discovered an additional issue on Ubuntu 16 (4.4.0-186-generic). In this version of the kernel, the feature testing does not define HAVE_BIO_BI_OPF and HAVE_ENUM_REQ_OP. Therefore, an additional conditional statement should be added to avoid compile errors due to redefinition of dattobd_set_bio_ops.

The issue may stem from this PR, but I am not entirely certain about the problem the PR intends to address. Based on my understanding, both HAVE_BIO_BI_OPF and HAVE_ENUM_REQ_OP flags are used to check for a kernel version >= 4.8. Therefore, my current fix may not necessarily be the best solution, and it's even possible that only one of the dattobd_set_bio_ops is needed.

@Swistusmen
Copy link
Collaborator

Thank you for your input, we will take care about it asap, but for now we're dealing with 1 issue and need to stop for a sec

@hongyuntw hongyuntw changed the title fix compile warning in blk_alloc_queue_1.c fix build failed in old ubuntu Jan 24, 2024
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.

None yet

2 participants