Whamcloud - gitweb
LU-15170 llite: Switch pcc to lookup_one_len
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 26 Oct 2021 22:52:47 +0000 (18:52 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 4 Nov 2021 17:20:25 +0000 (17:20 +0000)
commit206f7c50ba37492f99db9283df041e5545e809ca
tree66c7abc617d99751d15e555e726cc9040ca1969b
parent4846e3d5491572c9cec1acbd5c2bade246f67691
LU-15170 llite: Switch pcc to lookup_one_len

Using kern_path to lookup files in the PCC cache means we
are subject to user namespaces, so the PCC volume must be
mapped in to a container or the cached files cannot be
found.

One solution is to switch to using lookup_one_len - this is
what the code which *creates* PCC files does.  This
manually walks the path from the root, which avoids
namespace issues.

This is appropriate because PCC is kernel functionality -
the user should not be able to directly access the volume,
but it should be accessible as a cache.

Lustre-change: https://review.whamcloud.com/45436
Lustre-commit: 96c90859e14f3960b57eae54b3886aeef62f6f40 (tbd)

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Idd15574ace29543bed1a9937cb35404781714791
Reviewed-on: https://review.whamcloud.com/45380
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/pcc.c
lustre/tests/sanity-pcc.sh