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

client does not inherit default directory layout if changed

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 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

            People

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

              Dates

                Created:
                Updated:
                Resolved: