]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: check image size when loading encryption
authorIlya Dryomov <idryomov@gmail.com>
Fri, 16 Sep 2022 11:44:23 +0000 (13:44 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 4 Dec 2022 17:19:19 +0000 (18:19 +0100)
commit36c2d589af6a8ef88a96e9266613ed79dfb48b56
tree0fab9a18c519eb41889c161993f9bb93cf5ac931
parent203560999d98e05b46deaa98ecb675e26a521eab
librbd: check image size when loading encryption

Currently it's done in FormatRequest but not in LoadRequest.  However
an image can be shrunk to a size such that encryption can loaded (i.e.
enough of the header is still present) but nothing else can, breaking
implicit assumptions all around.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/crypto/luks/LoadRequest.cc
src/test/librbd/crypto/luks/test_mock_LoadRequest.cc
src/test/librbd/test_librbd.cc