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
Compilation error kernel 4.14.13 and zfs 0.7-release #7069
Comments
Ok, might be a gcc version issue. Trying 6.3.0 now. |
gcc 6.3.0 also fails. Same output. Note: I am building zfs into the kernel - not as separate modules. |
@voidzero I believe you have: |
@maxximino openzfs/spl#654 is a similar bug, you could probably examine that to see if a similar correction is needed for this to build here. |
@maxximino I did indeed have that enabled, and it compiles now that I disabled it. Thank you. Is this something that will be supported in the future? Any idea? |
This might get more problematic if stock kernels include more and more of meltdown mitigation. Btw. same here on Gentoo, kernel 4.14.14, ZFS 0.7.5-r1 (-r1 is gentoo-specific); CONFIG_GCC_PLUGIN_RANDSTRUCT=Y gives error; “N” lets zfs compile. But “N” reduces kernel security. |
I've been running with the following for about a year just fine. I build from git master though...
|
I also encounter the same issue when trying to compile zfs into the kernel (ZFS 0.7.7 into 4.14.28 with GCC 7.3.1). Disabling |
Sorry, we lost track of this one. We'll sort it out in the next point release, it was incidentally addressed is master by commit d4a72f2. |
Can you try rebuilding with 0.7.9? (just released today) |
sorry, it still doesn't seem to work with 0.7.9 (gcc 7.3.1, linux 4.14.40)
|
I confirm.
|
Compiles and works with the following patch. diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c
index 5e413c0..209b685 100644
--- a/module/zfs/metaslab.c
+++ b/module/zfs/metaslab.c
@@ -1049,11 +1049,11 @@ metaslab_rt_vacate(range_tree_t *rt, void *arg)
}
static range_tree_ops_t metaslab_rt_ops = {
- metaslab_rt_create,
- metaslab_rt_destroy,
- metaslab_rt_add,
- metaslab_rt_remove,
- metaslab_rt_vacate
+ .rtop_create = metaslab_rt_create,
+ .rtop_destroy = metaslab_rt_destroy,
+ .rtop_add = metaslab_rt_add,
+ .rtop_remove = metaslab_rt_remove,
+ .rtop_vacate = metaslab_rt_vacate
};
/* |
fs/zfs/zfs/metaslab.c:1055:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] metaslab_rt_remove, Closes: openzfs#7069 Signed-off-by: Georgy Yakovlev <ya@sysdump.net>
fs/zfs/zfs/metaslab.c:1055:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] metaslab_rt_remove, Closes: openzfs#7069 Signed-off-by: Georgy Yakovlev <ya@sysdump.net> Requires-spl: spl-0.7-release
fs/zfs/zfs/metaslab.c:1055:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] metaslab_rt_remove, Signed-off-by: Georgy Yakovlev <ya@sysdump.net> Requires-spl: spl-0.7-release Closes: openzfs#7069
fs/zfs/zfs/metaslab.c:1055:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] metaslab_rt_remove, Signed-off-by: Georgy Yakovlev <ya@sysdump.net> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes: openzfs#7069 Requires-spl: refs/pull/707/head
fs/zfs/zfs/metaslab.c:1055:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] metaslab_rt_remove, Signed-off-by: Georgy Yakovlev <ya@sysdump.net> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes: openzfs#7069
fs/zfs/zfs/metaslab.c:1055:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] metaslab_rt_remove, Signed-off-by: Georgy Yakovlev <ya@sysdump.net> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes: openzfs#7069
This should be fixed by 30d8b85, closing. |
System information
Compilation output:
The text was updated successfully, but these errors were encountered: