Whamcloud - gitweb
EX-3292 pcc: avoid to specify ID for every attach
authorQian Yingjin <qian@ddn.com>
Tue, 8 Jun 2021 09:54:49 +0000 (17:54 +0800)
committerLi Xi <lixi@ddn.com>
Tue, 13 Jul 2021 08:15:57 +0000 (08:15 +0000)
commitd18173b952a875220c8f23fcf05fe9f6fed9d3e4
tree377d2fcb0e7113bc5a6027010b4d21745f32e7e7
parent62b4ff02609c4a46660c9a0a805e166103f1e117
EX-3292 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

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Icd23eda5dca4711f9bb7af940f6cef5ddb97ce69
Reviewed-on: https://review.whamcloud.com/43946
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Feng, Lei <flei@whamcloud.com>
lustre/llite/pcc.c
lustre/tests/sanity-pcc.sh
lustre/utils/lfs.c