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

client does not inherit default directory layout if changed

Details

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

    Description

      If a directory is created and a default directory layout is added to it, the client is not aware that the new default layout exists because of the xattr cache, so the client does not take this into account when creating the directory.

      This can be seen clearly by setting a round-robin default layout on a directory below the normal 3-level round-robin default root layout, but I suspect it is always true:

      # mkdir -p /mnt/testfs/rr1/rr2/rr3/sub4
      # lfs setdirstripe -D -c 1 -i -1 --max-inherit-rr=3 /mnt/testfs/rr1/rr2/rr3/sub4
      # mkdir /mnt/testfs/rr1/rr2/rr3/sub4/d{1..64}
      # lfs getdirstripe -m /mnt/testfs/rr1/rr2/rr3/sub4/d{1..64} | sort | uniq -c
           64 1
      # lctl set_param ldlm.namespaces.*.lru_size=clear
      # mkdir /mnt/testfs/rr1/rr2/rr3/sub4/dd{1..64}
      # lfs getdirstripe -m /mnt/testfs/rr1/rr2/rr3/sub4/dd{1..64} | sort | uniq -c
            16 0
            16 1
            16 2
            16 3
      

      The default layout itself is inherited by the d* and dd* directories, because this is done locally to the MDT, but the decision to do round-robin allocation (and other directory default layouts) is not seen by the client until the directory lock/inode is cancelled and refreshed from the MDT.

      When "lfs setdirstripe -D" is run on the MDS, it should revoke the MDS_INODELOCK_XATTR lock bit from this directory on all clients, and the client doing this operation itself should include this lock for ELC along with the RPC.

      Attachments

        Issue Links

          Activity

            [LU-15070] client does not inherit default directory layout if changed
            pjones Peter Jones added a comment -

            Landed for 2.15

            pjones Peter Jones added a comment - Landed for 2.15

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45237/
            Subject: LU-15070 llite: update default LMV upon any change
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: f3314706b4e5c21f14908650decd92a30fdc1db9

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45237/ Subject: LU-15070 llite: update default LMV upon any change Project: fs/lustre-release Branch: master Current Patch Set: Commit: f3314706b4e5c21f14908650decd92a30fdc1db9

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45236/
            Subject: LU-15070 mdt: revoke remote LOOKUP lock for default LMV
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: b4645b5469c0722fdf66697379be878c071839cf

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45236/ Subject: LU-15070 mdt: revoke remote LOOKUP lock for default LMV Project: fs/lustre-release Branch: master Current Patch Set: Commit: b4645b5469c0722fdf66697379be878c071839cf

            "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45237
            Subject: LU-15070 llite: update default LMV upon any change
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: affdfbd78befddf7d25b7609ab78d207b093c4b0

            gerrit Gerrit Updater added a comment - "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45237 Subject: LU-15070 llite: update default LMV upon any change Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: affdfbd78befddf7d25b7609ab78d207b093c4b0

            "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45236
            Subject: LU-15070 mdt: set default LMV for remote dir
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: cd891b3dfbc47de9868d85b4d514ee97124ad2a5

            gerrit Gerrit Updater added a comment - "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45236 Subject: LU-15070 mdt: set default LMV for remote dir Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: cd891b3dfbc47de9868d85b4d514ee97124ad2a5
            laisiyao Lai Siyao added a comment -

            Strange I can't reproduce this on master and exa6 code, even if I copied the script and run.

            According to the code, when default LMV is set, MDT will revoke XATTR|LOOKUP lock.

            laisiyao Lai Siyao added a comment - Strange I can't reproduce this on master and exa6 code, even if I copied the script and run. According to the code, when default LMV is set, MDT will revoke XATTR|LOOKUP lock.

            People

              laisiyao Lai Siyao
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: