]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: don't temporarily shut down crypto when flattening
authorIlya Dryomov <idryomov@gmail.com>
Thu, 15 Sep 2022 07:33:01 +0000 (09:33 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 4 Dec 2022 17:19:19 +0000 (18:19 +0100)
commitabded6eedaa7d945ccadabfaece3aed5ef9d128f
treee8bbb9c2d7b06a827ec4db418b91ed1953f4005a
parent744379b8c60e23f3034d1a8ee94fb641809d791a
librbd: don't temporarily shut down crypto when flattening

(Temporarily) shutting down crypto can lead to data corruption in the
face of concurrent I/O, especially when flatten operation is proxied to
the remote lock owner.  This was added to be able to read, optionally
modify and write crypto header without it being subjected to remapping
and encryption itself.  read_header() and write_header() now achieve
that by specifying CRYPTO_HEADER area explicitly.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/crypto/luks/FlattenRequest.cc
src/librbd/crypto/luks/FlattenRequest.h
src/test/librbd/crypto/luks/test_mock_FlattenRequest.cc