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 ]