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

MDC does not cancel enough locks for setxattr

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • Lustre 2.7.0
    • 3
    • 15515

    Description

      In mdc_xattr_common() we cancel any MDS_INODELOCK_XATTR locks before setxattr. In mdt_reint_setxattr() we cancel (MDS_INODELOCK_UPDATE | MDS_INODELOCK_PERM | MDS_INODELOCK_LOOKUP) or (MDS_INODELOCK_UPDATE | MDS_INODELOCK_XATTR).

              lockpart = MDS_INODELOCK_UPDATE;
              /* Revoke all clients' lookup lock, since the access
               * permissions for this inode is changed when ACL_ACCESS is
               * set. This isn't needed for ACL_DEFAULT, since that does
               * not change the access permissions of this inode, nor any
               * other existing inodes. It is setting the ACLs inherited
               * by new directories/files at create time. */
              /* We need revoke both LOOKUP|PERM lock here, see mdt_attr_set. */
              if (!strcmp(xattr_name, XATTR_NAME_ACL_ACCESS))
              	lockpart |= MDS_INODELOCK_PERM | MDS_INODELOCK_LOOKUP;
              /* We need to take the lock on behalf of old clients so that newer
               * clients flush their xattr caches */
              else
                  	lockpart |= MDS_INODELOCK_XATTR;
      
      	lh = &info->mti_lh[MDT_LH_PARENT];
      	/* ACLs were sent to clients under LCK_CR locks, so taking LCK_EX
               * to cancel them. */
      	mdt_lock_reg_init(lh, LCK_EX);
      	obj = mdt_object_find_lock(info, rr->rr_fid1, lh, lockpart);
      

      Attachments

        Activity

          People

            wc-triage WC Triage
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: