Add an option to send datasets with params without preserving encryption#18240
Open
Idefix2020 wants to merge 1 commit intoopenzfs:masterfrom
Open
Add an option to send datasets with params without preserving encryption#18240Idefix2020 wants to merge 1 commit intoopenzfs:masterfrom
Idefix2020 wants to merge 1 commit intoopenzfs:masterfrom
Conversation
behlendorf
reviewed
Feb 27, 2026
Contributor
behlendorf
left a comment
There was a problem hiding this comment.
Thanks for tackling this much requested bit of functionality. Adding an explicit option to send the dataset unencrypted is a nice way to handle this and enable the use cases discussed in #10507. The PR itself looks reasonable, but it's going to need a test case added to make sure this new option is working properly. Can you add a test case along with the others in tests/zfs-tests/tests/functional/rsend/.
Author
|
@bbehlendorf Thanks for taking a look at this. I’ll add a test case as soon as possible. |
* Add an option to send datasets with params or replicate without preserving encryption * Add a test case for the new functionality Signed-off-by: Chris Jacobs <idefix2020dev@gmail.com>
Author
|
@behlendorf I've added the relevant test case. It looks to be working for me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Previously it was not possible to send an encrypted dataset with parameters (e.g.
-Ror-p). This is because the user would usually expect all parameters (including encryption) to be preserved when using the-Ror-pflags. For this reason the--rawflag was required on sending with-Ror-pto prevent accidentally unencrypting a dataset by sending it to a target without encryption.Fixes #10507
Description
This PR introduces the
--no-preserve-encryption/-Uflag to thezfs sendcommand, for if the user explicitly wants to send a dataset without preserving encryption. This prevents anyone from removing encryption on a dataset on accident. Additionally a warning is emmited on sending a previously encrypted dataset without preserving encryption. The idea for an additional flag originally came from #10507.How Has This Been Tested?
Tested sending encrypted datasets with
-Rand-p. Sending a dataset now works without--rawif--no-preserve-encryptionis specified.Types of changes
Checklist:
Signed-off-by.