Whamcloud - gitweb
LU-15170 llite: Switch pcc to lookup_one_len 36/45436/1
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 2 Nov 2021 19:27:31 +0000 (15:27 -0400)
committerPatrick Farrell <pfarrell@whamcloud.com>
Tue, 2 Nov 2021 19:33:49 +0000 (15:33 -0400)
commit96c90859e14f3960b57eae54b3886aeef62f6f40
tree5535a60031274abfdb3f7768208607453c2ba621
parent7e8f25ed3cd8b5435f92ba8b343aabfe0a180c5b
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.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Idd15574ace29543bed1a9937cb35404781714791
lustre/llite/pcc.c
lustre/tests/sanity-pcc.sh