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 zfs_rmnode() unlink / rollback issue #9739

Merged
merged 1 commit into from
Mar 18, 2020

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

Issue #6812.

Description

If a has rollback has occurred while a file is open and unlinked.
Then when the file is closed post rollback it will not exist in the
rolled back version of the unlinked object. Therefore, the call to
zap_remove_int() may correctly return ENOENT and should be allowed.

How Has This Been Tested?

Minimally, locally I performed some basic testing but was unable
to reproduce the original issue. This may be because I was only
testing using master which includes additional changes in this area.
Or because in my manual testing I wasn't able exactly force the
described scenario.

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:

@codecov
Copy link

codecov bot commented Dec 19, 2019

Codecov Report

Merging #9739 into master will increase coverage by <1%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #9739    +/-   ##
========================================
+ Coverage      79%      79%   +<1%     
========================================
  Files         385      385            
  Lines      121610   121611     +1     
========================================
+ Hits        96429    96525    +96     
+ Misses      25181    25086    -95
Flag Coverage Δ
#kernel 80% <100%> (ø) ⬇️
#user 67% <ø> (ø) ⬆️

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 6e1c594...62f5a31. Read the comment docs.

If a has rollback has occurred while a file is open and unlinked.
Then when the file is closed post rollback it will not exist in the
rolled back version of the unlinked object.  Therefore, the call to
zap_remove_int() may correctly return ENOENT and should be allowed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf behlendorf requested a review from lundman January 23, 2020 18:43
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Mar 16, 2020
@behlendorf behlendorf merged commit 5351951 into openzfs:master Mar 18, 2020
@bgly
Copy link

bgly commented Jun 18, 2020

@behlendorf Should this be in 0.8.X ? Since we are still seeing: #9741 on 0.8.3

@behlendorf
Copy link
Contributor Author

@bgly yes, that's a good idea. It has had enough soak time now in master.

bgly pushed a commit to buurst/zfs that referenced this pull request Jun 25, 2020
If a has rollback has occurred while a file is open and unlinked.
Then when the file is closed post rollback it will not exist in the
rolled back version of the unlinked object.  Therefore, the call to
zap_remove_int() may correctly return ENOENT and should be allowed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#6812 
Closes openzfs#9739
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
If a has rollback has occurred while a file is open and unlinked.
Then when the file is closed post rollback it will not exist in the
rolled back version of the unlinked object.  Therefore, the call to
zap_remove_int() may correctly return ENOENT and should be allowed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#6812 
Closes openzfs#9739
@behlendorf behlendorf deleted the issue-6812 branch April 19, 2021 19:23
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