Whamcloud - gitweb
LU-10499 pcc: avoid to specify ID for every attach 14/54414/6
authorQian Yingjin <qian@ddn.com>
Tue, 8 Jun 2021 09:54:49 +0000 (17:54 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 13 Jul 2024 20:52:27 +0000 (20:52 +0000)
commit31128f8f4e01a2351772d3de4daf78f12a5f44ab
treeaf67558e0759a9565be29b3cb35934b980d4c559
parent7652ab0c7539891abdf315562992501ae4a04f98
LU-10499 pcc: avoid to specify ID for every attach

In this patch, it avoids the need to specify "-i <attach_id>" for
every attach as in the very common case there is only a single
cache for that client.
If attach ID is not specified, it will select the first dataset
on the client as PCC backend.

And the new format of PCC state is as follows:
file: /mnt/lustre/f42.sanity-pcc, type: readonly, PCC_file:
/d42.sanity-pcc/0402/0x200000401:0x3:0x0, open_count: 0, flags: 0

EX-3752 pcc: show attaching state for PCC state output

When set llite.*.pcc_async_threshold=0, the client will do PCC
attach in asynchronous way.
When the file is large, attaching the file into PCC may take some
time.
In this patch, we improve that output of the PCC command
"lfs pcc state" to show that the file is in PCC attaching state
when the file is still in the phase of copying from Lustre OSTs
to PCC.
Was-Change-Id: I101d87638f5afac41fb4f55b4aaf95d938bc8ccd

EX-bug-id: EX-3292 EX-3752
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Icd23eda5dca4711f9bb7af940f6cef5ddb97ce69
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54414
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/pcc.c
lustre/tests/sanity-pcc.sh
lustre/utils/lfs.c