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
Reinstate raw receive check when truncating #8857
Conversation
Could you describe in the comment how we get into the case where this is not handled? |
Codecov Report
@@ Coverage Diff @@
## master #8857 +/- ##
==========================================
+ Coverage 78.64% 78.68% +0.03%
==========================================
Files 382 382
Lines 117771 117771
==========================================
+ Hits 92624 92663 +39
+ Misses 25147 25108 -39
Continue to review full report at Codecov.
|
@ahrens I still don't have a reproducer, but my current theory is that this can happen if you write some data to the last block of a file and then later replace that data with zeros with compression on. I believe that this will cause the block to be replaced with a hole, even though its not technically a truncation. The receive side will still just get an aggregated DRR_FREE record that includes the hole, so without this check it will attempt to do a real truncation. @kpande What test case? I'm sorry I don't remember. |
@tcaputi That makes sense. The way you've described it sounds straightforward to reproduce. Could you verify and then add a comment explaining this? E.g. something like |
@ahrens I will add the comment. I verified that this problem can occur, but i needed to use |
For documentation, this is the script I used to reproduce the issue:
|
I'm generally using pv between send/receive as well when I've been hitting this. |
This patch re-adds a check that was removed in 369aa50. The check confirms that a raw receive is not occuring before truncating an object's dn_maxblkid. At the time, it was believed that all cases that would hit this code path would be handled in other places, but that was not the case. Signed-off-by: Tom Caputi <tcaputi@datto.com>
This patch re-adds a check that was removed in 369aa50. The check confirms that a raw receive is not occuring before truncating an object's dn_maxblkid. At the time, it was believed that all cases that would hit this code path would be handled in other places, but that was not the case. Reviewed-by: Matt Ahrens <mahrens@delphix.com> Reviewed-by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes #8852 Closes #8857
This patch re-adds a check that was removed in 369aa50. The check
confirms that a raw receive is not occuring before truncating an
object's dn_maxblkid. At the time, it was believed that all cases
that would hit this code path would be handled in other places,
but that was not the case.
Signed-off-by: Tom Caputi tcaputi@datto.com
Types of changes
Checklist:
Signed-off-by
.