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

Consolidate arc_buf allocation checks #10057

Merged
merged 1 commit into from
Feb 28, 2020

Conversation

mattmacy
Copy link
Contributor

The following check currently occurs in three
separate locations in dbuf.c. This change
consolidates those checks in to dbuf_alloc_arcbuf

if (arc_is_encrypted(data)) {
...
} else if (compress_type != ZIO_COMPRESS_OFF) {
...
} else {
...
}

Signed-off-by: Matt Macy mmacy@FreeBSD.org

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.

@codecov-io
Copy link

codecov-io commented Feb 26, 2020

Codecov Report

Merging #10057 into master will increase coverage by <1%.
The diff coverage is 88%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #10057    +/-   ##
========================================
+ Coverage      79%      79%   +<1%     
========================================
  Files         386      386            
  Lines      122318   122304    -14     
========================================
+ Hits        96898    96980    +82     
+ Misses      25420    25324    -96
Flag Coverage Δ
#kernel 80% <88%> (ø) ⬆️
#user 67% <79%> (ø) ⬆️

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 28caa74...8817726. Read the comment docs.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Feb 26, 2020
The following check currently occurs in three
separate locations in dbuf.c. This change
consolidates those checks in to dbuf_alloc_arcbuf

if (arc_is_encrypted(data)) {
...
} else if (compress_type != ZIO_COMPRESS_OFF) {
...
} else {
...
}

Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Feb 27, 2020
@behlendorf behlendorf merged commit 13fac09 into openzfs:master Feb 28, 2020
@mattmacy mattmacy deleted the projects/dbuf_alloc_arcbuf branch March 2, 2020 01:29
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
The following check currently occurs in three separate locations
in dbuf.c.  This change consolidates those checks in to the
dbuf_alloc_arcbuf_from_arcbuf() function.

if (arc_is_encrypted(data)) {
...
} else if (compress_type != ZIO_COMPRESS_OFF) {
...
} else {
...
}

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes openzfs#10057
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