Whamcloud - gitweb
LU-16313 pcc: use two bits to indicate pcc type for attach
authorQian Yingjin <qian@ddn.com>
Tue, 15 Nov 2022 06:57:08 +0000 (01:57 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 6 Dec 2022 04:51:59 +0000 (04:51 +0000)
commitc8be6fafce0ed74ea3a8d6d41387bd6d1a8e215b
tree8e4ae10e7a1b9d6ea3d2b236cd0afb322807f76a
parent322a5a2513e34bcacf42015cfed68987b290b718
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.

Lustre-change: https://review.whamcloud.com/49160
Lustre-commit: 6e90974b1f4ac24c5a5d45ecc9bdb4d47018dab4

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Idee26018642a174b04d1d36a81952ea98a06514e
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49163
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/utils/liblustreapi_pcc.c