[LU-724] CLIO does not set lock handle in BRW Created: 29/Sep/11  Updated: 08/Feb/18  Resolved: 08/Feb/18

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.1.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Johann Lombardi (Inactive) Assignee: Jinshan Xiong (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 10478

 Description   

Unlike b1_8, CLIO does not set a valid lock handle in bulk write requests. osc_build_req() still uses oap->oap_ldlm_lock to fill the lock handle, but oap_ldlm_lock is always NULL, so we end up with oa->o_handle = NULL in requests.

We have been discussing for a while that all - when relevant of course - requests should specify a lock handle, so this is really a regression from this regard.
This lock handle is also used on the OST side to determine whether or not a BRW should make processed as a HP request. Not providing a lock handle put more load on the OST (e.g. in ost_rw_hpreq_check->ost_rw_prolong_locks()) since we always have to iterate over the list of dlm locks.



 Comments   
Comment by Jinshan Xiong (Inactive) [ 29/Sep/11 ]

Yup there exists dead code in osc_build_req() where it refers to ->oap_ldlm_lock for dlm lock and this field should be always NULL. However, it doesn't affect OBD_MD_FLHANDLE because it is handle in cl_req_attr_set -> osc_req_attr_set and osc_req_attr_set will find a dlm lock and set remote handle.

The purpose for clio to keep obsoleted code is to leave a door open if something doesn't work . Now that clio looks stable, I think it's okay to remove those obsoleted code.

Comment by Johann Lombardi (Inactive) [ 29/Sep/11 ]

Ah, great, i missed this code path. Thanks.

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