[LU-8842] Possible incorrect handling of IT_OPEN in mdc_enqueue Created: 16/Nov/16  Updated: 08/Jul/17  Resolved: 17/Dec/16

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

Type: Bug Priority: Minor
Reporter: Patrick Farrell (Inactive) Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: patch

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The patch at:
http://review.whamcloud.com/#/c/10205/3

Changes handling of IT_OPEN in mdc_enqueue:

	if (it != NULL) {
		LASSERT(policy == NULL);

		saved_flags |= LDLM_FL_HAS_INTENT;
		if (it->it_op & (IT_OPEN | IT_UNLINK | IT_GETATTR | IT_READDIR))
			policy = &update_policy;
		else if (it->it_op & IT_LAYOUT)
			policy = &layout_policy;
		else if (it->it_op & (IT_GETXATTR | IT_SETXATTR))
			policy = &getxattr_policy;
		else
			policy = &lookup_policy;
	}

Previously, IT_OPEN was not special cased, and so used the "lookup_policy".

This means instead of using MDS_INODELOCK_LOOKUP for the inodebits, it uses MDS_INODELOCK_UPDATE.

I am not aware of any bugs this causes, but John Hammond confirmed to me this was a mistake, so I'm going to push a patch to revert that part of the change. (I found this while looking in to an issue, but this turned out not to be the cause of that issue.)



 Comments   
Comment by Gerrit Updater [ 16/Nov/16 ]

Patrick Farrell (paf@cray.com) uploaded a new patch: http://review.whamcloud.com/23797
Subject: LU-8842 mdc: Make IT_OPEN take lookup bits lock
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8533d52cc8d33d3e92c8ccbe0a4de543f6560867

Comment by Gerrit Updater [ 17/Dec/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/23797/
Subject: LU-8842 mdc: Make IT_OPEN take lookup bits lock
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9c7cfa1f02769e0cfc51a03f1adfb14abdcc38cf

Comment by Peter Jones [ 17/Dec/16 ]

Landed for 2.10

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