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

sanity.sh test_129: max dir size limit work incorrectly.

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.6.0, Lustre 2.5.2
    • Lustre 2.2.0, Lustre 2.1.1, Lustre 2.1.2, Lustre 2.1.3, Lustre 1.8.x (1.8.0 - 1.8.5)
    • 3
    • 5820

    Description

      easy replicate by hand.
      [root@rhel6-64 test1]# for i in `seq 10000000`; do touch $i; done
      ...
      [root@rhel6-64 test1]# echo 16384 >/sys/fs/ldiskfs/loop0/max_dir_size
      root@rhel6-64 lustre]# ls -ls
      total 256
      256 drwxr-xr-x 2 root root 258048 Dec 12 12:28 test1
      [root@rhel6-64 lustre]# mkdir test1/proba
      mkdir: cannot create directory `test1/proba': File too large
      [root@rhel6-64 test1]# echo 0 >/sys/fs/ldiskfs/loop0/max_dir_size
      [root@rhel6-64 lustre]# cd test1
      [root@rhel6-64 test1]# rm -rf *
      [root@rhel6-64 test1]# ls -l
      total 0
      [root@rhel6-64 test1]# echo 16384 >/sys/fs/ldiskfs/loop0/max_dir_size
      [root@rhel6-64 test1]# cd ..
      [root@rhel6-64 lustre]# ls -ls
      total 264
      264 drwxr-xr-x 2 root root 266240 Dec 12 12:28 test1
      [root@rhel6-64 lustre]# mkdir test1/proba
      mkdir: cannot create directory `test1/proba': File too large
      [root@rhel6-64 lustre]#

      mkdir failed due wrong assumption - if we allocate an inode that is always allocate a space in directory, but ext4 isn't truncate a directory after removing an objects from it.

      that is caused random fails in sanity 129.
      + do_node mft51.xyua 'echo 16384 >/sys/fs/ldiskfs/loop0/max_dir_size'
      + local verbose=false
      + '[' xmft51.xyua = x--verbose ']'
      + local HOST=mft51.xyua
      + shift
      + local 'myPDSH=/usr/bin/pdsh -R ssh -S -w '
      + '[' mft51.xyua = mft51.xyua ']'
      + myPDSH=no_dsh
      + false
      + '[' no_dsh = rsh ']'
      + false
      + sed 's/^mft51.xyua: //'
      + no_dsh mft51.xyua '(PATH=$PATH:/usr/lib64/lustre/utils:/usr/lib64/lustre/tests:/sbin:/usr/sbin; cd /root; LUSTRE="/usr/lib64/lustre" sh -c "echo 16384 >/sys/fs/ldiskfs/loop0/max_dir_size")'
      + shift
      + eval '(PATH=$PATH:/usr/lib64/lustre/utils:/usr/lib64/lustre/tests:/sbin:/usr/sbin;' cd '/root;' 'LUSTRE="/usr/lib64/lustre"' sh -c '"echo' 16384 '>/sys/fs/ldiskfs/loop0/max_dir_size")'
      ++ PATH=/usr/lib64/lustre/tests/mpi:/usr/lib64/lustre/tests/racer:/usr/lib64/lustre/../lustre-iokit/sgpdd-survey:/usr/lib64/lustre/tests:/usr/lib64/lustre/utils/gss:/usr/lib64/lustre/utils:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/sbin::/usr/lib64/lustre/utils:/usr/lib64/lustre/tests:/sbin:/usr/sbin
      ++ cd /root
      ++ LUSTRE=/usr/lib64/lustre
      ++ sh -c 'echo 16384 >/sys/fs/ldiskfs/loop0/max_dir_size'
      + return 0
      + mkdir -p /mnt/lustre/d0.sanity/d129
      mkdir: cannot create directory `/mnt/lustre/d0.sanity': File too large
      + ls -l /mnt/lustre
      total 0

      Attachments

        Issue Links

          Activity

            [LU-2479] sanity.sh test_129: max dir size limit work incorrectly.
            emoly.liu Emoly Liu added a comment -

            The directory max size check in ldiskfs_append() should not be applied when an inode does not refer to a directory.
            Please take a look
            http://review.whamcloud.com/8137

            backport to b2_5: http://review.whamcloud.com/10043

            emoly.liu Emoly Liu added a comment - The directory max size check in ldiskfs_append() should not be applied when an inode does not refer to a directory. Please take a look http://review.whamcloud.com/8137 backport to b2_5: http://review.whamcloud.com/10043
            vsaveliev Vladimir Saveliev added a comment - - edited

            The directory max size check in ldiskfs_append() should not be applied when an inode does not refer to a directory.
            Please take a look
            http://review.whamcloud.com/8137

            vsaveliev Vladimir Saveliev added a comment - - edited The directory max size check in ldiskfs_append() should not be applied when an inode does not refer to a directory. Please take a look http://review.whamcloud.com/8137

            Patch has been merged.

            keith Keith Mannthey (Inactive) added a comment - Patch has been merged.

            New patch address the SLES11 issues. Will work with RHEL6.3, SLES11 SP1 and SP2. Haven't tried it on RHEL6.4 yet.

            simmonsja James A Simmons added a comment - New patch address the SLES11 issues. Will work with RHEL6.3, SLES11 SP1 and SP2. Haven't tried it on RHEL6.4 yet.

            Status update:
            I don`t understand why this patch should not be landed if it`s broke SLES11.
            1) this patch fix serios bug with simple reproducer, and result is - file creation would failed in empty directory.
            2) SLES11 patches are not landed yet.
            3) this fix is port from upstream ext4 branch and SLES need to include it also.

            aboyko Alexander Boyko added a comment - Status update: I don`t understand why this patch should not be landed if it`s broke SLES11. 1) this patch fix serios bug with simple reproducer, and result is - file creation would failed in empty directory. 2) SLES11 patches are not landed yet. 3) this fix is port from upstream ext4 branch and SLES need to include it also.
            aboyko Alexander Boyko added a comment - - edited

            http://review.whamcloud.com/#change,5140
            Maloo found the issue, it is relate to LU-2640

            aboyko Alexander Boyko added a comment - - edited http://review.whamcloud.com/#change,5140 Maloo found the issue, it is relate to LU-2640
            aboyko Alexander Boyko added a comment - http://review.whamcloud.com/#change,5140

            Keith,

            That is correct.
            Alexander Boyko <Alexander_Boyko@xyratex.com> work on that issue from Xyratex side and will be ready to submit fix shortly (first inspection round passed).

            shadow Alexey Lyashkov added a comment - Keith, That is correct. Alexander Boyko <Alexander_Boyko@xyratex.com> work on that issue from Xyratex side and will be ready to submit fix shortly (first inspection round passed).

            Alexey Lyashkov, Have you tested the above change and does it fix the error?

            keith Keith Mannthey (Inactive) added a comment - Alexey Lyashkov, Have you tested the above change and does it fix the error?
            keith Keith Mannthey (Inactive) added a comment - This same issue has been seen in our test rig. https://maloo.whamcloud.com/test_sessions/00d6be9e-5fbf-11e2-84d4-52540035b04c

            People

              wc-triage WC Triage
              shadow Alexey Lyashkov
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: