Whamcloud - gitweb
LU-15406 sec: fix in-kernel fscrypt support 87/45987/4
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 6 Jan 2022 09:18:20 +0000 (10:18 +0100)
committerOleg Drokin <green@whamcloud.com>
Tue, 18 Jan 2022 09:07:37 +0000 (09:07 +0000)
commit2169aed82a32df47be9aef2f249178ede6c7fadd
tree7851d280d7fbbbc1ff0efe6e8eb0a47a3f6df20d
parent46ff76137160b66f1d4437b3443859027faae9c4
LU-15406 sec: fix in-kernel fscrypt support

When using in-kernel fscrypt provided by Linux 5.4, the encryption
context can be retrieved by calling the .get_context function defined
in the struct fscrypt_operations of the super_block.
llite needs to retrieve the encryption context explicitly in case of
migration via volatile files.

Fixes: 09c558d16f ("LU-14677 sec: migrate/extend/split on encrypted file")
Fixes: fdbf2ffd41 ("LU-14677 sec: no encryption key migrate/extend/resync/split")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: I76dbd21f0dc95920519ea375c583bc378d7c9f53
Reviewed-on: https://review.whamcloud.com/45987
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_crypto.h
lustre/llite/namei.c