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 zed/udev thrashing due to autoexpand=on #7393

Closed
wants to merge 1 commit into from

Conversation

behlendorf
Copy link
Contributor

Description

Flushing the device and invaliding the page cache to ensure a consistent view of the device is only needed when the device was successfully expanded. Unconditionally performing these operations is safe but it has the side effect of triggering another udev change event which will be handled by the ZED.

Motivation and Context

Issue #7366

How Has This Been Tested?

Buildbot.

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.
  • All new and existing tests passed.
  • All commit messages are properly formatted and contain Signed-off-by.
  • Change has been approved by a ZFS on Linux member.

Flushing the device and invaliding the page cache to ensure a
consistent view of the device is only needed when the device
was successfully expanded.  Unconditionally performing these
operations is safe but it has the side effect of triggering
another udev change event which will be handled by the ZED.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#7366
@codecov
Copy link

codecov bot commented Apr 6, 2018

Codecov Report

Merging #7393 into master will decrease coverage by 0.18%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7393      +/-   ##
==========================================
- Coverage   76.39%    76.2%   -0.19%     
==========================================
  Files         329      329              
  Lines      104248   104249       +1     
==========================================
- Hits        79638    79442     -196     
- Misses      24610    24807     +197
Flag Coverage Δ
#kernel 76.23% <ø> (+0.06%) ⬆️
#user 65.26% <0%> (-0.38%) ⬇️

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 533ea04...82cdba6. Read the comment docs.

@behlendorf
Copy link
Contributor Author

Closing. Sounds like this doesn't resolve the issue. We'll need to open a new PR which open the device O_RDONLY and then checks if it can be expanded. Then assuming it can be efi_use_whole_disk can be called with O_RDWR.

@behlendorf behlendorf closed this Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants