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

Dedup IOC reference constants in libzfs_input_check #9188

Merged
merged 1 commit into from Aug 22, 2019
Merged

Dedup IOC reference constants in libzfs_input_check #9188

merged 1 commit into from Aug 22, 2019

Conversation

ghost
Copy link

@ghost ghost commented Aug 20, 2019

Motivation and Context

libzfs_input_check defines an enum of reference values for calculating ioctl numbers. The enum has a duplicated magic constant ('Z' << 8) as a base value. On FreeBSD the base value needs to be different.

Description

Reuse the enum value ZFS_IOC_BASE in place of ('Z' << 8) in later values. This is helpful on FreeBSD where ZFS_IOC_BASE has a different value and ('Z' << 8) is wrong.

How Has This Been Tested?

Test passes in ZTS.

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:

Reuse enum value ZFS_IOC_BASE for `('Z' << 8)`.
This is helpful on FreeBSD where ZFS_IOC_BASE has a different value and
`('Z' << 8)` is wrong.

Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Aug 21, 2019
@codecov
Copy link

codecov bot commented Aug 21, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9188      +/-   ##
==========================================
- Coverage   79.05%   72.88%   -6.17%     
==========================================
  Files         400      371      -29     
  Lines      122000   119430    -2570     
==========================================
- Hits        96443    87043    -9400     
- Misses      25557    32387    +6830
Flag Coverage Δ
#kernel 72.42% <ø> (-7.3%) ⬇️
#user 63.87% <ø> (-2.75%) ⬇️

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 325d288...85730b2. 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 Aug 21, 2019
@behlendorf behlendorf merged commit 0154a1e into openzfs:master Aug 22, 2019
@ghost ghost deleted the ioc-check-dedup branch August 22, 2019 16:50
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 24, 2019
Reuse enum value ZFS_IOC_BASE for `('Z' << 8)`.
This is helpful on FreeBSD where ZFS_IOC_BASE has a different value and
`('Z' << 8)` is wrong.

Reviewed-by: Chris Dunlop <chris@onthe.net.au>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes openzfs#9188
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
Reuse enum value ZFS_IOC_BASE for `('Z' << 8)`.
This is helpful on FreeBSD where ZFS_IOC_BASE has a different value and
`('Z' << 8)` is wrong.

Reviewed-by: Chris Dunlop <chris@onthe.net.au>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes openzfs#9188
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
Reuse enum value ZFS_IOC_BASE for `('Z' << 8)`.
This is helpful on FreeBSD where ZFS_IOC_BASE has a different value and
`('Z' << 8)` is wrong.

Reviewed-by: Chris Dunlop <chris@onthe.net.au>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9188
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants