Whamcloud - gitweb
LU-15855 enc: enc-unaware clients get ENOKEY if file not found 90/47790/2
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 13 May 2022 15:03:22 +0000 (17:03 +0200)
committerOleg Drokin <green@whamcloud.com>
Sat, 20 Aug 2022 16:14:38 +0000 (16:14 +0000)
commit405b1fc7fb9291e2768221f0b6762cfc8bfaacf6
tree8b5348e98dfeaf988bddd74da3af3d42768fb209
parent8ea47747c9fcf3ba1d0bca8456f2ad978f8dd2d5
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-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/47790
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/crypto.c
lustre/mdt/mdt_handler.c