]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix raw sends on encrypted datasets when copying back snapshots
authorGeorge Amanakis <gamanakis@gmail.com>
Fri, 4 Dec 2020 22:34:29 +0000 (23:34 +0100)
committerGitHub <noreply@github.com>
Fri, 4 Dec 2020 22:34:29 +0000 (14:34 -0800)
commitd1d47691c256cd7e15af7819ea33024e6693e9c5
tree3f0262126cdec6ab1035fd3e07759c55bb55477b
parent0cb40fa38903298b7af2b1084e8228b2c8315c4e
Fix raw sends on encrypted datasets when copying back snapshots

When sending raw encrypted datasets the user space accounting is present
when it's not expected to be. This leads to the subsequent mount failure
due a checksum error when verifying the local mac.
Fix this by clearing the OBJSET_FLAG_USERACCOUNTING_COMPLETE and reset
the local mac. This allows the user accounting to be correctly updated
on first mount using the normal upgrade process.

Reviewed-By: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-By: Tom Caputi <caputit1@tcnj.edu>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #10523
Closes #11221
module/os/freebsd/zfs/zio_crypt.c
module/os/linux/zfs/zio_crypt.c
module/zfs/dsl_crypt.c
tests/runfiles/common.run
tests/zfs-tests/tests/functional/userquota/userspace_send_encrypted.ksh [new file with mode: 0755]