-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[5.16] 'struct iov_iter' has no member named 'type' #12757
Comments
What version of zfs and os/kernel are you using? Similar PR implements a fix for the exact error you are encountering: #11411 |
See the commit in my second comment. The struct has changed in torvalds/linux HEAD. This change postdates the PR you are referencing. Thanks! |
In the future, it'd be very helpful if you used the standard issue template, providing the Linux kernel version you're using as well as the ZFS version you're using. Or answered the reply asking which versions you're using. (That would have made it much easier to determine that you were actually building for a Linux kernel from the The title of this issue should be changed to reflect that this is actually a 5.16 compat breakage. Anyway... after figuring out that this wasn't actually a 5.15 kernel build, I manually traced out what's going on: it looks like the The mentioned commit torvalds/linux@8cd54c1 is not actually terribly relevant; that change has been there since kernel 5.14. The relevant commit here appears to be torvalds/linux@a629459. (Which, as mentioned previously, is a Linux 5.16 commit.)
It would probably be helpful if you could attach the terminal output from the ZFS |
Titles updated, point taken. I am not using a distribution, and I generally am building the kernel from HEAD and ZFS from HEAD in a greenfield build. I'll use template next time. Please consider using CI, I'd prefer to be replaced by a bot :) |
Yeah I don't actually know what the "official" new-kernel-version compat procedure is around here, or if there necessarily is a set procedure. (I'm just a lowly contributor-of-a-few-patches-and-some-issue-reports-and-stuff.) Btw, sorry if the criticism came across as harsh. It probably would have helped if I had gone thru the issues in ascending order, rather than descending order; since HEAD was mentioned in at least one of the lower-numbered issues. In any case, it's helpful to know about upcoming kernel incompatibilities. 👍 |
The error is mine for saying 5.15 when the 5.16 merge window was happening, and filing bugs on Friday evening when my local builds weren't working :) Generally, I'm surprised when I end up with build errors, which is saying a lot. Glad to help concoct a build script to act as early warning, which was my goal here...if there's a better channel than github issues, glad to participate there. |
I took an initial crack at this but got this new error:
Maybe one of you can tell me what needs fixing?
|
cc: @ckane |
Oh. This seems to be another consequence of the change to the We already have a merged commit (453c63e) fixing a separate instance of something being broken by that particular upstream commit. In that case, it was possible to be clever and simply use a cast-to- But now that we know the definition of function |
I do have this fix (but not yet hooked up in autotools) in my tree. Basically need to conditionally compile the following when the diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c
index c17423426..dfb3644ba 100644
--- a/module/os/linux/zfs/zvol_os.c
+++ b/module/os/linux/zfs/zvol_os.c
@@ -762,7 +762,7 @@ static struct block_device_operations zvol_ops = {
.getgeo = zvol_getgeo,
.owner = THIS_MODULE,
#ifdef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS
- .submit_bio = zvol_submit_bio,
+ .submit_bio = (void(*)(struct bio *))zvol_submit_bio,
#endif
};
|
This change appears to fix the |
Likely fixed in #12819 |
@65a Seems like current master builds with kernel 5.16 perfectly fine. Do you confirm? |
I'm going to go ahead and close this. This build issue was resolved in master and the 2.1.3 release. |
zpl_file.c:255:15: error: 'struct iov_iter' has no member named 'type'
The text was updated successfully, but these errors were encountered: