[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 |