Whamcloud - gitweb
LU-15855 enc: enc-unaware clients get ENOKEY if file not found 49/47349/2
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 13 May 2022 15:03:22 +0000 (17:03 +0200)
committerOleg Drokin <green@whamcloud.com>
Mon, 27 Jun 2022 04:57:28 +0000 (04:57 +0000)
commit00898697f998c095e6dab3dd27e347cb1150ee8c
treecdeaa91d1249b808562a02734dd77ee8613c07a6
parent8f306f00c02e5455cef48d227f28e8cb90127719
LU-15855 enc: enc-unaware clients get ENOKEY if file not found

To reduce issues with applications running on clients without keys
or without fscrypt support that check for the existence of a file in
an encrypted directory, return -ENOKEY instead of -ENOENT.
For encryption-unaware clients, this is done on server side in the
mdt layer, by checking if clients have the OBD_CONNECT2_ENCRYPT
connection flag.
For clients without the key, this is done in llite when the searched
filename is not in encoded form.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I9a3b7af3a856b7fc7222c61a308ad23168869d57
Reviewed-on: https://review.whamcloud.com/47349
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/crypto.c
lustre/mdt/mdt_handler.c