-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 data corruption when cloning embedded blocks. #14739
Conversation
Don't overwrite blk_phys_birth, as for embedded blocks it is part of the payload. Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for running this down so quickly. The fix itself looks right to me.
Maybe integrating pjdfstest would be beneficial?
Adding this to the CI to provide more low level coverage of the system calls would be great.
We can add our own tools to the ZTS, although getting tests that use
We could use a github runner to integrate it into PRs, although at the moment, github runners do not support FreeBSD and we would like test coverage of this on FreeBSD since it is the only platform in the main repository where this feature is enabled. |
The problem with using |
It is possible to have tests disabled if the userland tools are not new enough. That said, I envision the initial version of the test being FreeBSD specific with Linux support added later when Linux support is merged into the repository. |
I've cp(1) tests ready that work on FreeBSD. I'll create a pull request soon. |
The zfs_log_clone_range() function is never called from the zfs_clone_range_replay() function, so I assumed it is safe to assert that zil_replaying() is never TRUE here. It turns out zil_replaying() also returns TRUE when the sync property is set to disabled. Fix the problem by just returning if zil_replaying() returns TRUE. Reported by: Florian Smeets Signed-off-by: Pawel Jakub Dawidek pawel@dawidek.net Approved by: oshogbo, mm
Don't overwrite blk_phys_birth, as for embedded blocks it is part of the payload. Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net> Issue openzfs#13392 Closes openzfs#14739
Don't overwrite blk_phys_birth, as for embedded blocks it is part of the payload. Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net> Issue openzfs#13392 Closes openzfs#14739
The zfs_log_clone_range() function is never called from the zfs_clone_range_replay() function, so I assumed it is safe to assert that zil_replaying() is never TRUE here. It turns out zil_replaying() also returns TRUE when the sync property is set to disabled. Fix the problem by just returning if zil_replaying() returns TRUE. Reported by: Florian Smeets Signed-off-by: Pawel Jakub Dawidek pawel@dawidek.net Approved by: oshogbo, mm
Don't overwrite blk_phys_birth, as for embedded blocks it is part of the payload.
Motivation and Context
Description
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.