Whamcloud - gitweb
EX-7395 pcc: use llapi_open_by_fid to check pinned files
authorQian Yingjin <qian@ddn.com>
Wed, 26 Apr 2023 09:18:18 +0000 (05:18 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 12 May 2023 07:19:48 +0000 (07:19 +0000)
commiteb2f436c8635cd9106619d2b2238d86d29ced705
treece8be66bc2de6440acc923f84ba599542dde23a6
parent58b973e624f81b6c0e6134b1d4905901f4e7577c
EX-7395 pcc: use llapi_open_by_fid to check pinned files

When check whether a file was pinned in PCC backend, it reported:
"cannot read or parse pin xattr of file
'/lustre/fsr/.lustre/fid/[0x780001b83:0x2138:0x0]'.: No such file
or directory (2)"

The failure reason is that open by FID is not configured for
subdirectory mounts.
In this patch, we use llapi_open_by_fid (which supports for
subdirectory mount) to open the file to solve this error.

Change-Id: If0120d745418836cfdf449a795b6f524c40f9c27
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/50770
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/lustre/lustreapi.h
lustre/utils/liblustreapi_pcc.c