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

__dquot_alloc_space() does not release i_lock in some cases

Details

    • 3
    • 11804

    Description

      The patch removing the dqptr sem seems to have introduced a regression. In __dquot_alloc_space(), the i_lock is not released if we exit through the goto out_flush_warn.

      int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
      ...
              spin_lock(&inode->i_lock);
      ...
              spin_lock(&dq_data_lock);
      ...
                      if (check_bdq(dquot[cnt], number, warn, warntype+cnt)
                          == NO_QUOTA && !nofail) {
                              ret = NO_QUOTA;
                              spin_unlock(&dq_data_lock);
                              goto out_flush_warn;
                      }
      ...
      out_flush_warn:
              flush_warnings(dquot, warntype);
              for (cnt = 0; cnt < MAXQUOTAS; cnt++)
                      dqput(dquot[cnt]);
      out:
              return ret;
      }
      

      Many thanks to Andrew Perepechko for reporting the problem.

      Attachments

        Activity

          [LU-4310] __dquot_alloc_space() does not release i_lock in some cases
          pjones Peter Jones made changes -
          Fix Version/s New: Lustre 2.5.1 [ 10608 ]
          Labels Original: mq114
          niu Niu Yawei (Inactive) added a comment - rh patch for b2_5: http://review.whamcloud.com/8601 sles patch for b2_5: http://review.whamcloud.com/8602

          backport sles patch from Andreas to b2_4: http://review.whamcloud.com/8600

          niu Niu Yawei (Inactive) added a comment - backport sles patch from Andreas to b2_4: http://review.whamcloud.com/8600
          pjones Peter Jones made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          pjones Peter Jones added a comment -

          Landed for 2.4.2 and 2.6. Will be landed for 2.5.1 when work commences on that release

          pjones Peter Jones added a comment - Landed for 2.4.2 and 2.6. Will be landed for 2.5.1 when work commences on that release

          We still need the patch to land to 2.5. Also their are separate SLES11 SP2 patches to back port to b2_4 and b2_5

          simmonsja James A Simmons added a comment - We still need the patch to land to 2.5. Also their are separate SLES11 SP2 patches to back port to b2_4 and b2_5

          can this ticket be closed?

          jlevi Jodi Levi (Inactive) added a comment - can this ticket be closed?
          bogl Bob Glossman (Inactive) made changes -
          Link New: This issue is related to INTL-25 [ INTL-25 ]
          yujian Jian Yu made changes -
          Fix Version/s New: Lustre 2.4.2 [ 10605 ]
          yujian Jian Yu added a comment -

          The patch landed on Lustre b2_4 branch for 2.4.2.

          yujian Jian Yu added a comment - The patch landed on Lustre b2_4 branch for 2.4.2.

          People

            johann Johann Lombardi (Inactive)
            johann Johann Lombardi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: