Whamcloud - gitweb
LU-15855 enc: enc-unaware clients get ENOKEY if file not found
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 13 May 2022 15:03:22 +0000 (17:03 +0200)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 29 Jun 2022 19:10:06 +0000 (19:10 +0000)
commitedce8a78b75be0be5fe98bb8e982bdd593fea281
treebbc0c1f876fbef39926ee04f7473b1ed4cbe0300
parentbb088999923e5d2bed8605d48908fe79f14fc8b2
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.

Lustre-change: https://review.whamcloud.com/47349
Lustre-commit: 00898697f998c095e6dab3dd27e347cb1150ee8c

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