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

Newly created file is same size as directory

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • Lustre 2.4.0
    • None
    • Lustre 2.3.54-2chaos, 2.3.57-2chaos. (github.com/chaos/lustre) ZFS OSTs.
    • 3
    • 5987

    Description

      We have a subdirectory where any newly created files, e.g. "touch newfile", is created with a file size that matches the size of the directory, as listed in "ls -la .".

      I'm not sure yet what is specially about this directory. I can't reproduce the problem in directories that I just "mkdir" myself.

      However, if "cp -a" the problem subdirectory somewhere else in the filesystem, I AM able to then recreate the problem there. In the original problem directory, the directory size is 10720, and any newly created file is 10720 in size. In one copy that I made, the directory size is 9728 bytes, and any newly created files are 9728 bytes.

      Very strange. I'm not yet sure what is special about the directory contents that makes it able to trigger this bug.

      I am able to read the files, and they just contain zeroes.

      Attachments

        Issue Links

          Activity

            [LU-2561] Newly created file is same size as directory
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-9663 [ LU-9663 ]
            pjones Peter Jones made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

            Patch 4956 landed on master. Ticket can be closed.

            morrone Christopher Morrone (Inactive) added a comment - Patch 4956 landed on master. Ticket can be closed.
            morrone Christopher Morrone (Inactive) made changes -
            Fix Version/s New: Lustre 2.4.0 [ 10154 ]
            morrone Christopher Morrone (Inactive) made changes -
            Labels Original: MB sequoia topsequoia New: MB sequoia

            Patch works for us. Just needs landing at this point. Removing "topsequoia" label.

            morrone Christopher Morrone (Inactive) added a comment - Patch works for us. Just needs landing at this point. Removing "topsequoia" label.
            jlevi Jodi Levi (Inactive) made changes -
            Labels Original: sequoia topsequoia New: MB sequoia topsequoia
            laisiyao Lai Siyao added a comment - Patch is on http://review.whamcloud.com/#change,4956
            laisiyao Lai Siyao added a comment -

            The cause is that mdd_declare_create() mistakenly declare attr set on child when default acl exists for parent, instead this should be done for parent and when child is directory only.

            I'll commit a fix later.

            laisiyao Lai Siyao added a comment - The cause is that mdd_declare_create() mistakenly declare attr set on child when default acl exists for parent, instead this should be done for parent and when child is directory only. I'll commit a fix later.
            laisiyao Lai Siyao made changes -
            Status Original: Open [ 1 ] New: In Progress [ 3 ]

            People

              laisiyao Lai Siyao
              morrone Christopher Morrone (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: