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

fix atomic_clear_long_excl wrong return #10526

Merged
merged 2 commits into from Jul 6, 2020
Merged

Conversation

winglq
Copy link
Contributor

@winglq winglq commented Jul 2, 2020

When clear a bit, we should check whether that bit is 1.
BTW atomic_clear_long_excl is not used.

Signed-off-by: Liu Qing winglq@gmail.com

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.

When clear a bit, we should check whether that bit is 1.
BTW atomic_clear_long_excl is not used.

Signed-off-by: Liu Qing <winglq@gmail.com>
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

You're right that this doesn't seem to be used anywhere. BT_ATOMIC_CLEAR_EXCL uses it but that is never used.

lib/libspl/asm-generic/atomic.c Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 2, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10526      +/-   ##
==========================================
- Coverage   79.65%   79.50%   -0.15%     
==========================================
  Files         391      391              
  Lines      123887   123887              
==========================================
- Hits        98684    98500     -184     
- Misses      25203    25387     +184     
Flag Coverage Δ
#kernel 80.04% <ø> (-0.08%) ⬇️
#user 65.51% <ø> (-0.59%) ⬇️
Impacted Files Coverage Δ
module/os/linux/spl/spl-kmem-cache.c 75.44% <0.00%> (-9.61%) ⬇️
module/zfs/vdev_indirect.c 74.16% <0.00%> (-9.17%) ⬇️
module/zfs/vdev_raidz.c 89.32% <0.00%> (-4.47%) ⬇️
module/zfs/bpobj.c 86.86% <0.00%> (-4.29%) ⬇️
module/lua/lmem.c 83.33% <0.00%> (-4.17%) ⬇️
module/zfs/zio_compress.c 89.74% <0.00%> (-2.57%) ⬇️
module/zfs/zrlock.c 95.08% <0.00%> (-1.64%) ⬇️
lib/libzfs/os/linux/libzfs_mount_os.c 62.30% <0.00%> (-1.58%) ⬇️
module/zfs/vdev_mirror.c 94.77% <0.00%> (-1.12%) ⬇️
module/zfs/zio.c 87.69% <0.00%> (-0.87%) ⬇️
... and 53 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 7ddb753...b88a0a0. Read the comment docs.

Co-authored-by: Ryan Moeller <ryan@freqlabs.com>
@ghost ghost added the Status: Code Review Needed Ready for review and testing label Jul 3, 2020
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jul 6, 2020
@behlendorf behlendorf merged commit a4b0a74 into openzfs:master Jul 6, 2020
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
When clearing a bit, we should check whether that bit is 0.
Note atomic_clear_long_excl is not used.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Liu Qing <winglq@gmail.com>
Closes openzfs#10526
sempervictus pushed a commit to sempervictus/zfs that referenced this pull request May 31, 2021
When clearing a bit, we should check whether that bit is 0.
Note atomic_clear_long_excl is not used.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Liu Qing <winglq@gmail.com>
Closes openzfs#10526
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.

None yet

2 participants