-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ZFS with --enable-debug fails to compile on Linux 3.3.0 #613
Milestone
Comments
Note that I am able to workaround this by changing the function prototypes of functions in zpl_inode.c to use umode_t instead of int in the case of create, mkdir and mknod and to use umode_t instead of mode_t in the case of a helper function. It breaks older kernels, but proper preprocessor directives should fix that. |
Closed
ryao
added a commit
to ryao/zfs
that referenced
this issue
Apr 27, 2012
Linux 3.3.0 changed some of the function prototypes in inode_operations. In specific, they changed create, mkdir and mknod. The third argument is now umode_t instead of int. This caused a build with --enable-debug to fail. --disable-debug is unaffected. We fix this by introducing preprocessor directives to alter the function prototypes on Linux 3.3.0 and greater. This closes ZFSOnLinux issue openzfs#613. Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
Fix merged as commit b39d3b9 |
pcd1193182
pushed a commit
to pcd1193182/zfs
that referenced
this issue
Sep 26, 2023
The sysinfo crate changed the meaning of `System::total_memory()`, from returning kilobytes to returning bytes. This makes the agent think that the system has 1024x the amount of RAM that it really does, and we try to use more memory than exists. The problem was introduced by PR openzfs#608 This commit changes our code to interpret the new meaning of the return value correctly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Linux 3.3.0 appears to have changed some of the function prototypes in inode_operations. In specific, they changed zpl_create, mkdir and mknod. The third argument is now umode_t instead of int.
This causes a build with --enable-debug to fail with the following message. --disable-debug is unaffected.
cc1: warnings being treated as errors
/var/tmp/portage/sys-fs/zfs-9999/work/zfs-9999/module/zfs/../../module/zfs/zpl_inode.c:355:2: error: initialization from incompatible pointer type
/var/tmp/portage/sys-fs/zfs-9999/work/zfs-9999/module/zfs/../../module/zfs/zpl_inode.c:359:2: error: initialization from incompatible pointer type
/var/tmp/portage/sys-fs/zfs-9999/work/zfs-9999/module/zfs/../../module/zfs/zpl_inode.c:361:2: error: initialization from incompatible pointer type
/var/tmp/portage/sys-fs/zfs-9999/work/zfs-9999/module/zfs/../../module/zfs/zpl_inode.c:376:2: error: initialization from incompatible pointer type
/var/tmp/portage/sys-fs/zfs-9999/work/zfs-9999/module/zfs/../../module/zfs/zpl_inode.c:381:2: error: initialization from incompatible pointer type
/var/tmp/portage/sys-fs/zfs-9999/work/zfs-9999/module/zfs/../../module/zfs/zpl_inode.c:383:2: error: initialization from incompatible pointer type
make[6]: *** [/var/tmp/portage/sys-fs/zfs-9999/work/zfs-9999/module/zfs/../../module/zfs/zpl_inode.o] Error 1
The text was updated successfully, but these errors were encountered: