[LU-16313] PCC: change PCC type with bit matching for attach Created: 15/Nov/22  Updated: 06/Dec/22  Resolved: 06/Dec/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0

Type: Improvement Priority: Minor
Reporter: Qian Yingjin Assignee: Qian Yingjin
Resolution: Fixed Votes: 0
Labels: None

Rank (Obsolete): 9223372036854775807

 Description   

We only support two PCC type: readonly and readwirte:

enum lu_pcc_type {
    LU_PCC_NONE = 0,
    LU_PCC_READWRITE,
    LU_PCC_READONLY,
    LU_PCC_MAX
};
struct lu_pcc_attach {
    __u32 pcca_type; /* PCC type */
    __u32 pcca_id; /* archive ID for readwrite, group ID for readonly */
};

The attach  data structure @lu_pcc_attach is using 32 bit @pcca_type to determine the type.

we could change it from "== LU_PCC_READWRITE" to "&LU_PCC_READWRITE" to determine the PCC type via 2 bit matching. The left bits can be used as other flags for PCC attach such the asynchronous attach via the command "lfs pcc attach -A".



 Comments   
Comment by Gerrit Updater [ 15/Nov/22 ]

"Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49160
Subject: LU-16313 pcc: use two bits to indicate pcc type for attach
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 05625e9774fac05ea1cf00f32637539fca1f966e

Comment by Gerrit Updater [ 06/Dec/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49160/
Subject: LU-16313 pcc: use two bits to indicate pcc type for attach
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6e90974b1f4ac24c5a5d45ecc9bdb4d47018dab4

Comment by Peter Jones [ 06/Dec/22 ]

Landed for 2.16

Generated at Sat Feb 10 03:25:53 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.