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

libzfs_pool: Remove unused check for ENOTBLK #10173

Merged
merged 1 commit into from
Apr 7, 2020

Conversation

spaghetti-
Copy link
Contributor

@spaghetti- spaghetti- commented Apr 2, 2020

Commit 379ca9c removed the check on aux devices to be block devices also
changing zfs_ioctl(hdl, ZFS_IOC_VDEV_ADD, ...) and
zfs_ioctl(hdl, ZFS_IOC_POOL_CREATE, ...) to never set ENOTBLK. This
change removes the dangling check for ENOTBLK that will never trigger.

Reported-by: Richard Elling [email protected]
Signed-off-by: Alex John [email protected]

Motivation and Context

Description

How Has This Been Tested?

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.

Commit 379ca9c removed the check on aux devices to be block devices also
changing zfs_ioctl(hdl, ZFS_IOC_VDEV_ADD, ...) and
zfs_ioctl(hdl, ZFS_IOC_POOL_CREATE, ...) to never set ENOTBLK. This
change removes the dangling check for ENOTBLK that will never trigger.

Reported-by: Richard Elling <[email protected]>
Signed-off-by: Alex John <[email protected]>
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Apr 2, 2020
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

Looks good. This check could trigger if you're using old kernel modules with the newer user space (not recommended). But even after we remove this the standard error message will be "Block device required" which is still pretty reasonable.

@codecov-io
Copy link

Codecov Report

Merging #10173 into master will increase coverage by 0.21%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10173      +/-   ##
==========================================
+ Coverage   78.98%   79.20%   +0.21%     
==========================================
  Files         385      385              
  Lines      122594   122589       -5     
==========================================
+ Hits        96831    97093     +262     
+ Misses      25763    25496     -267     
Flag Coverage Δ
#kernel 79.72% <ø> (+0.10%) ⬆️
#user 65.46% <ø> (+0.51%) ⬆️
Impacted Files Coverage Δ
lib/libzfs/libzfs_pool.c 74.11% <ø> (+0.21%) ⬆️
cmd/zdb/zdb_il.c 30.86% <0.00%> (-24.08%) ⬇️
module/lua/lmem.c 83.33% <0.00%> (-4.17%) ⬇️
module/zfs/zio_compress.c 89.74% <0.00%> (-2.57%) ⬇️
module/zfs/dsl_synctask.c 92.40% <0.00%> (-2.54%) ⬇️
lib/libzfs/libzfs_changelist.c 84.37% <0.00%> (-1.96%) ⬇️
module/zcommon/zfs_uio.c 87.75% <0.00%> (-1.03%) ⬇️
module/zfs/vdev_trim.c 95.47% <0.00%> (-0.91%) ⬇️
module/os/linux/zfs/vdev_disk.c 83.27% <0.00%> (-0.73%) ⬇️
lib/libzutil/os/linux/zutil_import_os.c 77.74% <0.00%> (-0.67%) ⬇️
... and 58 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 5a42ef0...7839af2. 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 Apr 7, 2020
@behlendorf behlendorf merged commit 2a15c6a into openzfs:master Apr 7, 2020
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Commit 379ca9c removed the check on aux devices to be block devices also
changing zfs_ioctl(hdl, ZFS_IOC_VDEV_ADD, ...) and
zfs_ioctl(hdl, ZFS_IOC_POOL_CREATE, ...) to never set ENOTBLK. This
change removes the dangling check for ENOTBLK that will never trigger.

Reviewed-by: Brian Behlendorf <[email protected]>
Reported-by: Richard Elling <[email protected]>
Signed-off-by: Alex John <[email protected]>
Closes openzfs#10173
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.

3 participants