[LU-7543] reserve lock flags for upcoming features and future expansion Created: 11/Dec/15  Updated: 23/Sep/16  Resolved: 06/Jan/16

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

Type: Bug Priority: Major
Reporter: nasf (Inactive) Assignee: nasf (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The obd_connect_flags field has almost run out of bits to add new features. Reserve the last few free bits for upcoming features and the very last bit for OBD_CONNECT_FLAGS2 to create obd_connect_flags2, to have space for new features. Any feature that is using a bit in obd_connect_flags2 needs to understand OBD_CONNECT_FLAGS2 as well.



 Comments   
Comment by Gerrit Updater [ 11/Dec/15 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/17559
Subject: LU-7543 obd: reserve some connection flags
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 799a54e6079c20a995ad2c89f07722305214851c

Comment by Andreas Dilger [ 12/Dec/15 ]

The connection handing code on the server would need to add OBD_CONNECT_FLAGS2 checking, and then add a separate OST_CONNECT2_SUPPORTED MDT_CONNECT2_SUPPORTED, and MGS_CONNECT2_SUPPORTED masks for that word. Strictly speaking, clients shouldn't care if obd_connect_flags2 is masked off or not, since an older server will drop OBD_CONNECT_FLAGS2 and the client should check if this is still valid before trying to check obd_connect_flags2 features.

It might be best to hide this complexity inside accessor functions like:

bool obd_connect_has_grant(struct obd_connect_data *ocd)
{
        return ocd->obd_connect_data & OBD_CONNECT_GRANT;
}

bool obd_connect_has_future_feature(struct obd_connect_data *ocd)
{
        return ocd->obd_connect_data & OBD_CONNECT_FLAGS2 &&
               ocd->obd_connect_data2 & OBD_CONNECT2_FUTURE_FEATURE;
}

Otherwise, there is a danger of someone using an OBD_CONNECT2_* flag with obd_connect_data incorrectly, and having multiple checks throughout the code is just ugly. This would also allow us to change the above helper function to "return false" if a feature is disabled at compile time for some reason without having to mess with the rest of the code.

Comment by Andreas Dilger [ 12/Dec/15 ]

There are several older feature flags that could begin to be deprecated, for "features" that were more like transient bug fixes and not expected to ever be removed, or features that are always set on all connections and provide no value:

  • OBD_CONNECT_CROW: was never used in production, though it might some day be implemented?
  • OBD_CONNECT_NODEVOH: change mdt_finish_open() to assume it is always set, it is a bugfix from 1.4.6
  • OBD_CONNECT_REQPORTAL: change osc_import_event() to assume this feature is supported, bugfix from 1.5
  • OBD_CONNECT_JOIN: deprecated feature since 1.8.0, 2.0.66
  • OBD_CONNECT_MDS/OSS_CAPA: removed in 2.8 so stop sending this flag in client_common_fill_super(), and remove checks in tgt_init_sec_level()
  • OBD_CONNECT_RMT_CLIENT+_FORCE: never used in production and not safe anyway, remove checks from tgt_init_sec_level()
  • OBD_CONNECT_AT: mandatory feature since 1.6, assume it is set in rev_import_flags_update(), ptlrpc_connect_set_flags(), ptl_send_rpc()
  • OBD_CONNECT_REAL: I don't think this does anything useful since 2.4 removed LMV from MDS, and was only ever an internal flag
Comment by Gerrit Updater [ 17/Dec/15 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/17644
Subject: LU-7543 obd: reserve connection flag OBD_CONNECT_SUBTREE
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 6a5cd7efd43be27ed2d8edd2d5b1973d5e6da933

Comment by Gerrit Updater [ 17/Dec/15 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/17645
Subject: LU-7543 obd: reserve connection flag OBD_CONNECT_OBDOPACK
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 4cbe3cfb592ff71fbf167d40137b4d281e8d9921

Comment by Gerrit Updater [ 17/Dec/15 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/17646
Subject: LU-7543 obd: reserve connection flag OBD_CONNECT_LOCK_AHEAD
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 6f4b258acba31e3779f047a1dd7cd668789949bd

Comment by Gerrit Updater [ 17/Dec/15 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/17647
Subject: LU-7543 obd: reserve connection flag OBD_CONNECT_FLAGS2
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 632a9bfbe51e1c7e947276ee7aff6a1bda03ba80

Comment by Gerrit Updater [ 06/Jan/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/17644/
Subject: LU-7543 obd: reserve connection flag OBD_CONNECT_SUBTREE
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 2b16de10d79f930283a1a0dc6e8c9c2a779aae5d

Comment by Gerrit Updater [ 06/Jan/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/17645/
Subject: LU-7543 obd: reserve connection flag OBD_CONNECT_OBDOPACK
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c801f497807f45e7e081f0e1ea11037749a60270

Comment by Gerrit Updater [ 06/Jan/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/17646/
Subject: LU-7543 obd: reserve connection flag OBD_CONNECT_LOCK_AHEAD
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 20d7508afa3b6f3ac703b4d43e5b1ad0ba782f19

Comment by Gerrit Updater [ 06/Jan/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/17647/
Subject: LU-7543 obd: reserve connection flag OBD_CONNECT_FLAGS2
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a5dc6abb06215856dde2d572f7d4c24dddebb718

Comment by nasf (Inactive) [ 06/Jan/16 ]

The patches have been landed to master.

Generated at Sat Feb 10 02:09:48 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.