Whamcloud - gitweb
LU-10499 pcc: don't reopen mountpoint for each cache file 88/54388/6
authorQian Yingjin <qian@ddn.com>
Fri, 19 Mar 2021 08:45:26 +0000 (16:45 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 8 Jul 2024 20:10:03 +0000 (20:10 +0000)
commit8dcdb6a4731f2953c4c4506b010da307cc99fa0a
treed3aca8896c4ae8f10f638f5dd311bdd05442b201
parent5be466e87304101e582df4c30edd830e528d08fb
LU-10499 pcc: don't reopen mountpoint for each cache file

When scanning and processing files in the PCC cache filesystem
(e.g. "llapi_pcc_scan_detach()" is looking for the Lustre
mountpoint and reopening it for every file processed.

This patch changed it to open the Lustre mountpoint only once,
then reuse the file handle for all of the later calls. The file
handle will be closed when finished the processing.

This patch also repaces to use llapi_fid_parse to get FID from
an given string.

EX-bug-id: EX-2861
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Iad92c216262296096e30ca4a4c6b2765dfd3afaa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54388
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre/lustreapi.h
lustre/llite/vvp_io.c
lustre/utils/lfs.c
lustre/utils/libhsm_scanner.h
lustre/utils/liblustreapi_pcc.c