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

"lfs getdirstripe -D subdir" does not show correct inherited layout

Details

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

    Description

      The default directory layout printed for non-root directories does not correctly show the actual layout specified on the root directory:

      # lfs getdirstripe -D /mnt/testfs
      lmv_stripe_count: 1 lmv_stripe_offset: -1 lmv_hash_type: none lmv_max_inherit: -1 lmv_max_inherit_rr: 3
      # lfs getdirstripe -D /mnt/testfs/etc 
      lmv_stripe_count: 0 lmv_stripe_offset: -1 lmv_hash_type: none lmv_max_inherit: -1 lmv_max_inherit_rr: 0
      # getfattr -d -m - -e hex /mnt/testfs /mnt/testfs/etc
      # file: mnt/testfs
      trusted.dmv=0xd00cd30c01000000ffffffff000000000000000000030000000000000000000000000000000000000000000000000000
      trusted.lma=0x000000000000000007000000020000000100000000000000
      # file: mnt/testfs/etc
      trusted.link=0xdff1ea11010000002d000000000000000000000000000000001500000002000000070000000100000000657463
      trusted.lma=0x000000000000000002040000020000000100000000000000
      

      The default directory layout stored on the root directory is printed properly, and is correctly inherited by actual subdirectories created in the filesystem, but this is not what is shown by "lfs getdirstripe -D" on the client. It is printing a "generic" default layout if no trusted.lmv xattr is found.

      Instead, it would be more correct to return the inherited trusted.lmv from the root directory, if it exists and the lmv_max_inherit depth allows it, along with reducing lmv_max_inherit and lmv_max_inherit_rr by lli_depth if they are not -1.

      Attachments

        Issue Links

          Activity

            [LU-15200] "lfs getdirstripe -D subdir" does not show correct inherited layout
            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/45570/
            Subject: LU-15200 llite: "lfs getdirstripe -D" shows inherit layout
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 61b1fad9e3fb21edcc0e713c89a3bfaeba9c883e

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45570/ Subject: LU-15200 llite: "lfs getdirstripe -D" shows inherit layout Project: fs/lustre-release Branch: master Current Patch Set: Commit: 61b1fad9e3fb21edcc0e713c89a3bfaeba9c883e

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45599/
            Subject: LU-15200 llite: revalidate dentry if LOOKUP lock fetched
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 92fadf9cc1d06b21b482a262ff66f435814a13f8

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45599/ Subject: LU-15200 llite: revalidate dentry if LOOKUP lock fetched Project: fs/lustre-release Branch: master Current Patch Set: Commit: 92fadf9cc1d06b21b482a262ff66f435814a13f8

            "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45599
            Subject: LU-15200 llite: revalidate dentry if LOOKUP lock fetched
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 88c7ef277631143e39c7eeb0a49dbbc33aa38f3a

            gerrit Gerrit Updater added a comment - "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45599 Subject: LU-15200 llite: revalidate dentry if LOOKUP lock fetched Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 88c7ef277631143e39c7eeb0a49dbbc33aa38f3a

            "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45570
            Subject: LU-15200 llite: "lfs getdirstripe -D" shows inherit layout
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 3bb59e4ffa2e877eeb3ceb24dc848b54f0a7dbfb

            gerrit Gerrit Updater added a comment - "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45570 Subject: LU-15200 llite: "lfs getdirstripe -D" shows inherit layout Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 3bb59e4ffa2e877eeb3ceb24dc848b54f0a7dbfb

            It looks like ll_dir_getstripe_default() is specifically excluding fetching the default LMV, but it should do that since LU-14792 now has a filesystem-wide default directory layout for the filesystem on the root directory.

            adilger Andreas Dilger added a comment - It looks like ll_dir_getstripe_default() is specifically excluding fetching the default LMV, but it should do that since LU-14792 now has a filesystem-wide default directory layout for the filesystem on the root directory.

            People

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

              Dates

                Created:
                Updated:
                Resolved: