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

config/kernel-inode-times: initialize timespec #10281

Merged
merged 1 commit into from
May 4, 2020

Conversation

alaviss
Copy link
Contributor

@alaviss alaviss commented May 1, 2020

Motivation and Context

Usage of the uninitalized timespec64 triggers -Werror,-Wuninitialized
when compiled under clang for linux kernel 5.6, leading the build system
to believe that the function is not declared. This in turn breaks the build.

See #10279

Description

Initializes the said variable to suppress the warning.

How Has This Been Tested?

Tested on my own system.

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:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain Signed-off-by.

Usage of this variable uninitialized triggers -Werror,-Wuninitialized
when compiled under clang for linux kernel 5.6, leading the build system
to believe that the function is not declared.

This commit initalizes the variable to suppress the warning and fix the
build for kernel 5.6 with clang.

Fixes openzfs#10279

Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
@behlendorf behlendorf added the Type: Building Indicates an issue related to building binaries label May 1, 2020
Copy link

@lkthomas lkthomas left a comment

Choose a reason for hiding this comment

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

confirmed working on Fedora 31,

LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 31 (Thirty One)
Release: 31
Codename: ThirtyOne
Linux localhost.localdomain 5.6.7-200.fc31.x86_64 #1 SMP Thu Apr 23 14:22:57 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

@codecov-io
Copy link

codecov-io commented May 2, 2020

Codecov Report

Merging #10281 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10281      +/-   ##
==========================================
- Coverage   79.52%   79.48%   -0.04%     
==========================================
  Files         389      389              
  Lines      123120   123120              
==========================================
- Hits        97906    97868      -38     
- Misses      25214    25252      +38     
Flag Coverage Δ
#kernel 79.84% <ø> (-0.07%) ⬇️
#user 65.89% <ø> (-0.14%) ⬇️
Impacted Files Coverage Δ
module/os/linux/spl/spl-zlib.c 55.35% <0.00%> (-28.58%) ⬇️
module/os/linux/spl/spl-kmem-cache.c 75.22% <0.00%> (-8.50%) ⬇️
cmd/zvol_id/zvol_id_main.c 76.31% <0.00%> (-5.27%) ⬇️
module/zfs/space_map.c 93.31% <0.00%> (-4.96%) ⬇️
module/zfs/spa_checkpoint.c 93.78% <0.00%> (-4.35%) ⬇️
module/zfs/vdev_raidz.c 89.21% <0.00%> (-4.25%) ⬇️
module/lua/lmem.c 83.33% <0.00%> (-4.17%) ⬇️
module/zfs/dsl_synctask.c 92.40% <0.00%> (-2.54%) ⬇️
module/zfs/lzjb.c 98.14% <0.00%> (-1.86%) ⬇️
cmd/zed/agents/fmd_api.c 88.61% <0.00%> (-1.78%) ⬇️
... and 55 more

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 6ed4391...6ffba2b. Read the comment docs.

@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label May 4, 2020
@behlendorf behlendorf merged commit 3e5d41d into openzfs:master May 4, 2020
as-com pushed a commit to as-com/zfs that referenced this pull request Jun 20, 2020
Usage of this variable uninitialized triggers -Werror,-Wuninitialized
when compiled under clang for linux kernel 5.6, leading the build system
to believe that the function is not declared.

This commit initializes the variable to suppress the warning and fix the
build for kernel 5.6 with clang.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
Closes openzfs#10279
Closes openzfs#10281 
(cherry picked from commit 3e5d41d)
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Usage of this variable uninitialized triggers -Werror,-Wuninitialized
when compiled under clang for linux kernel 5.6, leading the build system
to believe that the function is not declared.

This commit initializes the variable to suppress the warning and fix the
build for kernel 5.6 with clang.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
Closes openzfs#10279
Closes openzfs#10281
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) Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants