Whamcloud - gitweb
LU-12275 sec: encryption for write path 44/36144/27
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 17 Jul 2019 14:24:26 +0000 (14:24 +0000)
committerOleg Drokin <green@whamcloud.com>
Tue, 16 Jun 2020 03:53:33 +0000 (03:53 +0000)
commita9ed5b149646f91f23839bbe2d755542d129f5b7
tree935affecc55078849580c7e753ab6aebacafd241
parent300858ccfcd00b52663de45e0bb472012242f342
LU-12275 sec: encryption for write path

First aspect is to make sure encryption context is properly set on
files/dirs that are created or opened/looked up.
Then encryption itself is carried out in osc_brw_prep_request(), just
before pages are added to the request to be sent. Because pages in
the page cache must hold clear text data, we have to use bounce pages
for encryption. The allocation is handled by fscrypt, and for
deallocation we call fscrypt_pullback_bio_page() and/or
fscrypt_pullback_bio_page().

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ieb1355bd55b6a8740e4b549d60d1f480a5abc53f
Reviewed-on: https://review.whamcloud.com/36144
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 files changed:
lustre/include/lustre_osc.h
lustre/include/obd.h
lustre/include/obd_support.h
lustre/llite/crypto.c
lustre/llite/dir.c
lustre/llite/namei.c
lustre/llite/rw26.c
lustre/obdecho/echo.c
lustre/obdecho/echo_client.c
lustre/obdecho/echo_internal.h
lustre/osc/osc_internal.h
lustre/osc/osc_request.c