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

ldiskfs quota accounting iterator is flawed

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.10.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      The ldiskfs quota accounting iterator is flawed, that'll result in some accounting entries being missed in the output of proc files (acct_user & acct_group).

      This can be reproduced by:

      • Create a fresh filesystem;
      • Run the following script to generate large amount of accounting entries:
        #!/bin/bash
        for i in `seq 10000`; do
                touch /mnt/lustre/file_$i
                chown $i:$i /mnt/lustre/file_$i
        done
        
      • Verify proc file by: cat /proc/fs/lustre/osd-ldiskfs/lustre-MDT0000/quota_slave/acct_user; Some entries are missed in the output.

      Attachments

        Activity

          [LU-8801] ldiskfs quota accounting iterator is flawed
          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/23583/
          Subject: LU-8801 quota: fix ldiskfs accounting iterator
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 623b315f6ddf8aa6ef435aa405e371ba93d0454a

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/23583/ Subject: LU-8801 quota: fix ldiskfs accounting iterator Project: fs/lustre-release Branch: master Current Patch Set: Commit: 623b315f6ddf8aa6ef435aa405e371ba93d0454a

          Another problem is that reading acct_user/group will become extremely slow when the amount of id entries is large, because in each lprocfs_quota_seq_start(), we use it->next() to move the cursor to current the last processed position like this:

                 while (offset--) {
                         rc = iops->next(&lqp->lqp_env, it);
                         if (rc != 0) /* Error or reach the end */
                                 goto not_found;
                 }
          

          Which is quite time consuming when the accounting file getting large. I'll optimize it with above fix together.

          niu Niu Yawei (Inactive) added a comment - Another problem is that reading acct_user/group will become extremely slow when the amount of id entries is large, because in each lprocfs_quota_seq_start(), we use it->next() to move the cursor to current the last processed position like this: while (offset--) { rc = iops->next(&lqp->lqp_env, it); if (rc != 0) /* Error or reach the end */ goto not_found; } Which is quite time consuming when the accounting file getting large. I'll optimize it with above fix together.

          Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/23583
          Subject: LU-8801 quota: fix ldiskfs accounting iterator
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: bcb301aad574beed8022b1d34dc2bab02c64ca5b

          gerrit Gerrit Updater added a comment - Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/23583 Subject: LU-8801 quota: fix ldiskfs accounting iterator Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: bcb301aad574beed8022b1d34dc2bab02c64ca5b

          People

            niu Niu Yawei (Inactive)
            niu Niu Yawei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: