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 4.20 compat: current_kernel_time() #8074

Merged
merged 1 commit into from Oct 31, 2018

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

Compatibility with the latest kernels. See the following build failure.

http://build.zfsonlinux.org/builders/Kernel.org%20Built-in%20x86_64%20%28BUILD%29/builds/23324

Description

Commit torvalds/linux@976516404 removed the current_kernel_time()
function (and several others). All callers are expected to use
current_kernel_time64(). Update the gethrestime_sec() wrapper
accordingly.

How Has This Been Tested?

Locally compiled.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

Commit torvalds/linux@976516404 removed the current_kernel_time()
function (and several others).  All callers are expected to use
current_kernel_time64().  Update the gethrestime_sec() wrapper
accordingly.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Oct 30, 2018
@bunder2015
Copy link
Contributor

fwiw, I have two machines running 4.19.0 and they compiled and run okay. I can't see what version they added this to.

@behlendorf
Copy link
Contributor Author

behlendorf commented Oct 30, 2018

Looks like this is post 4.19:

$ git describe 976516404ff3fab2a8caa8bd6f5efc1437fed0b8
v4.19-rc1-1-g976516404ff3

@codecov
Copy link

codecov bot commented Oct 31, 2018

Codecov Report

Merging #8074 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8074      +/-   ##
==========================================
+ Coverage   78.39%   78.43%   +0.03%     
==========================================
  Files         377      377              
  Lines      114494   114494              
==========================================
+ Hits        89763    89804      +41     
+ Misses      24731    24690      -41
Flag Coverage Δ
#kernel 78.82% <100%> (+0.03%) ⬆️
#user 67.28% <ø> (+0.2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9042f60...8501452. Read the comment docs.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Oct 31, 2018
@behlendorf behlendorf changed the title Linux 4.19 compat: current_kernel_time() Linux 4.20 compat: current_kernel_time() Oct 31, 2018
Copy link
Contributor

@ofaaland ofaaland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@behlendorf behlendorf merged commit 82c0a05 into openzfs:master Oct 31, 2018
@tonyhutter tonyhutter added this to To do in 0.7.12 Oct 31, 2018
@tonyhutter tonyhutter moved this from To do to In progress in 0.7.12 Nov 6, 2018
satmandu added a commit to satmandu/zfs that referenced this pull request Dec 26, 2018
While openzfs/spl@cd1b28e fixed the 4.20 current_kernel_time issues in spl as per openzfs#8074 in .07.x, current_kernel_time is still being used inside zpios-ctl.h in 0.7.x.

I believe this may fix this issue in 0.7.x to allow it to compile successfully for kernel 4.2.0.
@satmandu
Copy link
Contributor

@tonyhutter FYI there is one more issue with getting 0.7.x to compile for Linux kernel 4.20.

GregorKopka pushed a commit to GregorKopka/zfs that referenced this pull request Jan 7, 2019
Commit torvalds/linux@976516404 removed the current_kernel_time()
function (and several others).  All callers are expected to use
current_kernel_time64().  Update the gethrestime_sec() wrapper
accordingly.

Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#8074
@tonyhutter tonyhutter added this to To do in 0.7.13 Jan 7, 2019
@tonyhutter tonyhutter moved this from To do to In progress in 0.7.13 Jan 28, 2019
@behlendorf behlendorf deleted the linux-compat branch April 19, 2021 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
No open projects
0.7.12
  
In progress
0.7.13
  
In progress
Development

Successfully merging this pull request may close these issues.

None yet

5 participants