Whamcloud - gitweb
LU-15170 llite: Switch pcc to lookup_one_len 36/45436/15
authorPatrick Farrell <pfarrell@whamcloud.com>
Wed, 8 Dec 2021 20:19:31 +0000 (15:19 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 11 Jan 2022 06:18:32 +0000 (06:18 +0000)
commitf3be560031cc7022a22f4c661f94ac7aa6f617f1
tree3d9e78a49de81bb43706d583d6eca0cebbfecd92
parent787c1884e6451ae764568ade3658e537dcc19097
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
Reviewed-on: https://review.whamcloud.com/45436
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/pcc.c
lustre/tests/sanity-pcc.sh