[LU-16218] allow lfs setstripe --comp-flags to separate prefrd and prefwr Created: 06/Oct/22  Updated: 22/Jan/24  Resolved: 16/Oct/23

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

Type: Improvement Priority: Minor
Reporter: Andreas Dilger Assignee: Jian Yu
Resolution: Fixed Votes: 0
Labels: easy

Issue Links:
Related
Rank (Obsolete): 9223372036854775807

 Description   

The initial implementation of "lfs setstripe ... --comp-flags=prefer" only allowed specifying a single "prefer" argument for a given mirror component, which would set both the "LCME_FL_PREF_RD" and "LCME_FL_PREF_WR" flags at the same time. This was done simply because there wasn't any good use case to expose two separate flag options to userspace (documentation, ease of use).

The client code checks PREF_RD appropriately when selecting a mirror to read, and the MDS/LOD checks PREF_WR appropriately when selecting a mirror to write, so it should be straight forward to add "--comp-flags [prefwr|prefrd]" parsing in "lfs setstripe" (comp_str2flags()) to set only the individual flags on a mirror. The "lfs getstripe" command (lcme_flags2str() should still print "prefer" if both flags are set (both for simplicity and compatibility), but should print either "prefrd" or "prefwr" if only one flag is set.

The lfs-getstripe.1, lfs-setstripe.1, and lfs-mirror-create.1 man pages should also be updated to document these new options.



 Comments   
Comment by Gerrit Updater [ 25/Sep/23 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52508
Subject: LU-16218 utils: add component flags "prefrd" and "prefwr"
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 073fa143530c5b32ed528d24d00616b3ee3289fd

Comment by Gerrit Updater [ 16/Oct/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52508/
Subject: LU-16218 utils: add component flags "prefrd" and "prefwr"
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6f5870dd87e51f7671c83c0b3c6181967cf22e0b

Comment by Peter Jones [ 16/Oct/23 ]

Landed for 2.16

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