]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd/migration: make ImageDispatch handle encryption for non-native formats 59144/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 2 Aug 2024 07:27:42 +0000 (09:27 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 11 Aug 2024 08:45:38 +0000 (10:45 +0200)
commit9f4f427df230e7241b3307e2cf164aade6c0d5df
tree49cff9105e9c3f537e9b177a62b4fd8ee3875f6f
parentcaeb7272d3b216467a02a2526b73b707bbc27b31
librbd/migration: make ImageDispatch handle encryption for non-native formats

With NativeFormat now being handled via dispatch, handling encryption
for non-native formats (i.e. mapping to raw image extents and performing
decryption/mapping back on completion) in the migration layer is really
straightforward.

Note that alignment doesn't need to be performed in the migration layer
because it happens on the destination image -- the "align and resubmit"
logic in C_UnalignedObjectReadRequest should kick in before the call to
read_parent().

Fixes: https://tracker.ceph.com/issues/53674
Co-authored-by: Or Ozeri <oro@il.ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 0000c3447407772039121bb4499f243df1c889da)

Conflicts:
qa/workunits/rbd/luks-encryption.sh [
          - commit 9892ead7fcd9 ("librbd/crypto: allow loading luks
            format without specifying version") not in quincy -- pass
            through $format to test_migration_read_and_copyup() and
            test_migration_native_with_snaps()
          - commit 1d3de19c4005 ("tools/rbd: add encryption format
            support for cloned image") not in quincy -- drop
            test_migration_clone() ]
src/librbd/migration/ImageDispatch.cc [ ImageArea support and
  commit 20aee5bbbcb5 ("neorados: Make IOContext getters/setters
  less weird") not in quincy ]
qa/workunits/rbd/luks-encryption.sh
src/librbd/migration/ImageDispatch.cc
src/librbd/migration/OpenSourceImageRequest.cc