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

Linux 5.0: implicit declaration of function current_kernel_time64 #8258

Closed
tonyhutter opened this issue Jan 9, 2019 · 1 comment
Closed
Assignees
Labels
Type: Building Indicates an issue related to building binaries
Projects

Comments

@tonyhutter
Copy link
Contributor

System information

Type Version/Name
Distribution Name Fedora
Distribution Version 30 (rawhide)
Linux Kernel 5.0.0-0.rc1.git0.1.fc30.x86_64
Architecture x86-64
ZFS Version master
SPL Version master

Describe the problem you're observing

current_kernel_time64() was removed from recent kernels. Looks like ktime_get_coarse_real_ts64() should be used instead.
https://lkml.org/lkml/2018/7/11/202
https://lkml.org/lkml/2018/12/17/110

Describe how to reproduce the problem

Build master in rawhide

Include any warning/errors/backtraces from the system logs

In file included from /home/hutter/zfs/include/spl/sys/condvar.h:33,
                 from /home/hutter/zfs/include/sys/zfs_context.h:38,
                 from /home/hutter/zfs/include/sys/crypto/common.h:39,
                 from /home/hutter/zfs/module/icp/illumos-crypto.c:35:
/home/hutter/zfs/include/spl/sys/time.h: In function ‘gethrestime’:
/home/hutter/zfs/include/spl/sys/time.h:76:8: error: implicit declaration of function ‘current_kernel_time64’; did you mean ‘core_kernel_text’? [-Werror=implicit-function-declaration]
  *ts = current_kernel_time64();
        ^~~~~~~~~~~~~~~~~~~~~
        core_kernel_text
/home/hutter/zfs/include/spl/sys/time.h:76:6: error: incompatible types when assigning to type ‘inode_timespec_t’ {aka ‘struct timespec64’} from type ‘int’
  *ts = current_kernel_time64();
      ^
/home/hutter/zfs/include/spl/sys/time.h: In function ‘gethrestime_sec’:
/home/hutter/zfs/include/spl/sys/time.h:86:24: error: invalid initializer
  inode_timespec_t ts = current_kernel_time64();
                        ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
@tonyhutter tonyhutter self-assigned this Jan 9, 2019
@tonyhutter tonyhutter added the Type: Building Indicates an issue related to building binaries label Jan 9, 2019
tonyhutter added a commit to tonyhutter/zfs that referenced this issue Jan 9, 2019
Newer kernels remove current_kernel_time64().  Use
ktime_get_coarse_real_ts64() in its place.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes: openzfs#8258
@tonyhutter tonyhutter changed the title implicit declaration of function current_kernel_time64 Linux 5.0: implicit declaration of function current_kernel_time64 Jan 9, 2019
behlendorf pushed a commit to behlendorf/zfs that referenced this issue Jan 16, 2019
Newer kernels remove current_kernel_time64().  Use
ktime_get_coarse_real_ts64() in its place.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes: openzfs#8258
tonyhutter added a commit to tonyhutter/zfs that referenced this issue Jan 17, 2019
Newer kernels remove current_kernel_time64().  Use
ktime_get_coarse_real_ts64() in its place.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes: openzfs#8258
@Hubbitus
Copy link

Looks related to https://lore.kernel.org/patchwork/patch/562186/

tonyhutter added a commit to tonyhutter/zfs that referenced this issue Jan 25, 2019
Newer kernels remove current_kernel_time64().  Use
ktime_get_coarse_real_ts64() in its place.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes: openzfs#8258
allanjude pushed a commit to allanjude/zfs that referenced this issue Jun 29, 2019
Newer kernels remove current_kernel_time64().  Use
ktime_get_coarse_real_ts64() in its place.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes openzfs#8258
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Building Indicates an issue related to building binaries
Projects
No open projects
0.7.13
  
Awaiting triage
Development

Successfully merging a pull request may close this issue.

2 participants