Whamcloud - gitweb
EX-4182 sec: support of PCC-RO for encrypted files
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 20 Dec 2021 16:41:56 +0000 (17:41 +0100)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 21 Mar 2022 18:48:42 +0000 (18:48 +0000)
commit393697cac059cb9e5820cccbc77358a1ff02aa62
treeee7e6214a1771451c8eb21918fd7c9a392c7af5d
parent112b589024d8f8f66e1aac09beba7d9a56c645d7
EX-4182 sec: support of PCC-RO for encrypted files

In order to support PCC-RO for encrypted files, we decide to store
in PCC the ciphertext version of the Lustre files. We proceed to
decryption of PCC files only in the page cache, so cleartext is just
in memory. When a Lustre file is detached from PCC, or when the
encryption key is removed, we trash those PCC page cache pages.

As PCC files contain ciphertext, their sizes are aligned on
LUSTRE_ENCRYPTION_UNIT_SIZE instead of being lustre inode's clear
text size. In order to keep track of Lustre files' actual sizes,
we use a dedicated xattr on the PCC files. Its value is set at pcc
attach time, which is fine for PCC-RO.

Also add sanity-pcc test_21j to exercise this.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Id7d96adb4eb4770c813a042acf7ed6c42224b9bf
Reviewed-on: https://review.whamcloud.com/45910
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/lustre_crypto.h
lustre/llite/crypto.c
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/llite_lib.c
lustre/llite/namei.c
lustre/llite/pcc.c
lustre/llite/symlink.c
lustre/osc/osc_request.c
lustre/tests/sanity-pcc.sh
lustre/utils/liblustreapi_pcc.c