Whamcloud - gitweb
LU-16313 pcc: use two bits to indicate pcc type for attach 60/49160/5
authorQian Yingjin <qian@ddn.com>
Tue, 15 Nov 2022 06:57:08 +0000 (01:57 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 6 Dec 2022 02:44:26 +0000 (02:44 +0000)
commit6e90974b1f4ac24c5a5d45ecc9bdb4d47018dab4
treed325d77e57e159797b42bbfbb6cd0ba1f4296cc1
parent2edde0147bcbff7d21656fe4b964705be44ad5cc
LU-16313 pcc: use two bits to indicate pcc type for attach

PCC currenty supports two types: readwrite and readonly.
The attach data structure @lu_pcc_attach is using 32 bit value to
indicate the PCC type:
struct lu_pcc_attach {
__u32 pcca_type;
__u32 pcca_id;
};

In this patch, it changes to use 2 bits to represent the PCC type.
The left bits in @pcca_type can be used as flags for attach such
as a flag to indicate using the asynchronous attach via the
command "lfs pcc attach -A" for PCCRO.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Idee26018642a174b04d1d36a81952ea98a06514e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49160
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>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/utils/liblustreapi_pcc.c