[LU-13094] Handle ENOENT lookup failure correctly on MDT Created: 20/Dec/19  Updated: 02/Apr/22  Resolved: 02/Apr/22

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

Type: Bug Priority: Minor
Reporter: Qian Yingjin Assignee: Qian Yingjin
Resolution: Not a Bug Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In current Lustre code, lookup() or getattr() via IT_LOOKUP or IT_GETATTR in mdt_intent_getattr will treat -ENOENT error wrongly as follows:

        rc = mdt_getattr_name_lock(info, lhc, child_bits, ldlm_rep);
	ldlm_rep->lock_policy_res2 = clear_serious(rc);

        if (mdt_get_disposition(ldlm_rep, DISP_LOOKUP_NEG))
                ldlm_rep->lock_policy_res2 = 0;

When DISP_LOOKUP_NEG is set, we can not set the status of intent lock with 0. Otherwise, the client will cache and validate the dentry incorrectly.



 Comments   
Comment by Gerrit Updater [ 20/Dec/19 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/37077
Subject: LU-13094 mdt: handle ENOENT lookup failre correctly
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a406a1a4778b56eb9f025a408ba93f4e188f7986

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