Details
-
Bug
-
Resolution: Not a Bug
-
Minor
-
None
-
None
-
None
-
3
-
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.