Whamcloud - gitweb
EX-7331 sec: add support for encryption plus compression
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 2 Jun 2023 13:27:01 +0000 (13:27 +0000)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 11 Sep 2023 00:20:51 +0000 (00:20 +0000)
commiteb70ba19e944cd765dfaccfff4f560b97c35383d
treea3870d218df63433e1020ba021d6d4b08c185607
parent1d28405f702d8b9a41ab3e20f78bf22753bdf7e9
EX-7331 sec: add support for encryption plus compression

For compression efficiency, encryption must be carried out on write
after data has been compressed. Otherwise, encrypted data would be
almost incompressible. And on read, decryption must occur before data
is decompressed.
This means encryption is called on pages produced as a result of
compression. However, for encryption to work, pages need to have a
proper mapping and index.
So we need to manually copy index and mapping from the original page
cache pages, to the pages used to store compressed data. In case of
Direct IO, we leverage information available from the cl_page.

Add sanity-sec test_66 to exercise encryption+compression.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Id54d41365d5a21c54611b8e4af5059088ef87183
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51216
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
lustre/osc/osc_compress.c
lustre/osc/osc_request.c
lustre/tests/sanity-sec.sh
lustre/tests/test-framework.sh
lustre/utils/liblustreapi_layout.c