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

The link count is not updated after the mkdir

    XMLWordPrintable

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: