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.
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I101d87638f5afac41fb4f55b4aaf95d938bc8ccd
Reviewed-on: https://review.whamcloud.com/44852
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
char *buf;
char *path;
int buf_len = sizeof(state->pccs_path);
+ struct ll_inode_info *lli = ll_i2info(inode);
struct pcc_inode *pcci;
ENTRY;
pcci = ll_i2pcci(inode);
if (pcci == NULL) {
state->pccs_type = LU_PCC_NONE;
+ state->pccs_flags = lli->lli_pcc_state;
GOTO(out_unlock, rc = 0);
}
state->pccs_type = pcci->pcci_type;
state->pccs_open_count = count;
- state->pccs_flags = ll_i2info(inode)->lli_pcc_state;
+ state->pccs_flags = lli->lli_pcc_state;
path = dentry_path_raw(pcci->pcci_path.dentry, buf, buf_len);
if (IS_ERR(path))
GOTO(out_unlock, rc = PTR_ERR(path));
printf(", type: %s", pcc_type2string(state.pccs_type));
if (state.pccs_type == LU_PCC_NONE &&
state.pccs_open_count == 0) {
+ if (state.pccs_flags & PCC_STATE_FL_ATTACHING)
+ printf(", flags: attaching");
printf("\n");
continue;
}