Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-8842

Possible incorrect handling of IT_OPEN in mdc_enqueue

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.10.0
    • None
    • 3
    • 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.)

      Attachments

        Activity

          [LU-8842] Possible incorrect handling of IT_OPEN in mdc_enqueue
          pjones Peter Jones added a comment -

          Landed for 2.10

          pjones Peter Jones added a comment - Landed for 2.10

          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

          gerrit Gerrit Updater added a comment - 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

          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

          gerrit Gerrit Updater added a comment - 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

          People

            wc-triage WC Triage
            paf Patrick Farrell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: