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

The link count is not updated after the mkdir

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • Lustre 2.5.0, Lustre 2.4.2
    • Lustre 2.2.0, Lustre 2.3.0, Lustre 2.1.5
    • RHEL6.3
    • 3
    • 7956

    Description

      We sometimes saw incorrect link counts after the mkdir or remove directories.
      The link counts seem not to be updated after create/remove directory.

      We created a simple reproducer for this problem below.

      #!/bin/sh -x 
      
      TESTDIR=/lustre/linkcount_test
      [ -d "$TESTDIR" ] && rm -rf $TESTDIR
      
      mkdir $TESTDIR
      cd $TESTDIR
      ls
      mkdir a b
      ls
      ls -adl $TESTDIR
      rmdir b
      ls -ald
      
      # ./test.sh
      + TESTDIR=/lustre/linkcount_test
      + '[' -d /lustre/linkcount_test ']'
      + rm -rf /lustre/linkcount_test
      + mkdir /lustre/linkcount_test
      + cd /lustre/linkcount_test
      + ls
      + mkdir a b
      + ls
      a  b
      + ls -adl /lustre/linkcount_test
      drwxr-xr-x 2 root root 4096 Apr 30 02:52 /lustre/linkcount_test
                ^^^
                This should be 4 after two directories created.
      + rmdir b
      + ls -ald
      drwxr-xr-x 3 root root 4096 Apr 30 02:52 .
                ^^^
                Updated after an directory is removed.
      

      This problem happens on b2_1, b2_2 and b2_3, but not happens if both server and clients are running with current master.
      However, master (server) - b2_1(client), we see same problem.

      Attachments

        Issue Links

          Activity

            [LU-3240] The link count is not updated after the mkdir
            shadow Alexey Lyashkov added a comment - - edited

            please reopen a ticket due introducing an regressions with open with last Oleg changes
            and removing one huge and important part from original patch.

            ps. it's strange - but i don't able to reopen ticket.

            shadow Alexey Lyashkov added a comment - - edited please reopen a ticket due introducing an regressions with open with last Oleg changes and removing one huge and important part from original patch. ps. it's strange - but i don't able to reopen ticket.
            yujian Jian Yu added a comment -

            The patch was cherry-picked to Lustre b2_4 branch.

            yujian Jian Yu added a comment - The patch was cherry-picked to Lustre b2_4 branch.
            bogl Bob Glossman (Inactive) added a comment - backport to b2_4 http://review.whamcloud.com/8317

            Sebastien,

            As I understand it, that second patch is not required. Oleg commented (I can't find where right now) that it was unnecessary to send the parent FID when doing that operation, as the child FID is sufficient. I don't believe it fixes any specific problem, it's just cleanup/improvement.

            To summarize:
            http://review.whamcloud.com/6460 is, by itself, the full fix for LU-3240. 7910 is as you said - a bonus patch that came out of the work for 6460.

            paf Patrick Farrell (Inactive) added a comment - Sebastien, As I understand it, that second patch is not required. Oleg commented (I can't find where right now) that it was unnecessary to send the parent FID when doing that operation, as the child FID is sufficient. I don't believe it fixes any specific problem, it's just cleanup/improvement. To summarize: http://review.whamcloud.com/6460 is, by itself, the full fix for LU-3240 . 7910 is as you said - a bonus patch that came out of the work for 6460.

            I am sorry, but in addition to patch http://review.whamcloud.com/6460 that was landed on master, I can also see patch http://review.whamcloud.com/7910 merged at the same time.
            Where this patch is coming from? Is this a mandatory part of the solution to this bug? Or is this just a bonus patch?

            TIA,
            Sebastien.

            sebastien.buisson Sebastien Buisson (Inactive) added a comment - I am sorry, but in addition to patch http://review.whamcloud.com/6460 that was landed on master, I can also see patch http://review.whamcloud.com/7910 merged at the same time. Where this patch is coming from? Is this a mandatory part of the solution to this bug? Or is this just a bonus patch? TIA, Sebastien.

            Eliminating the extra roc when revalidating remote objects is being handled in LU-4095.

            jlevi Jodi Levi (Inactive) added a comment - Eliminating the extra roc when revalidating remote objects is being handled in LU-4095 .
            pjones Peter Jones added a comment -

            Cory yes that would be more clear

            pjones Peter Jones added a comment - Cory yes that would be more clear
            spitzcor Cory Spitz added a comment -

            Should 'Fix Version/s' == 2.5.0?

            spitzcor Cory Spitz added a comment - Should 'Fix Version/s' == 2.5.0?

            I tested Patch Set 5 of http://review.whamcloud.com/6460 with master, it partially solve the LU-4050.

            dmiter Dmitry Eremin (Inactive) added a comment - I tested Patch Set 5 of http://review.whamcloud.com/6460 with master, it partially solve the LU-4050 .

            I tested set 4 of patch http://review.whamcloud.com/6460 on a lustre 2.4.0 client, and it also fixes the issue described in LU-3849.

            patrick.valentin Patrick Valentin (Inactive) added a comment - I tested set 4 of patch http://review.whamcloud.com/6460 on a lustre 2.4.0 client, and it also fixes the issue described in LU-3849 .

            People

              utopiabound Nathaniel Clark
              ihara Shuichi Ihara (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: