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

symlink migration should not create remote inodes

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • Lustre 2.14.0
    • Lustre 2.8.0, Lustre 2.13.0, Lustre 2.10.6
    • None
    • 9223372036854775807

    Description

      Migrating a symlink should not leave a remote agent inode on the original MDT in the extremely common case where there is not a hardlink to the symlink (apparently that is possible under POSIX and Linux allows it, who knew?):

      touch tt
      $ ln -s tt tt.link
      $ ln -n tt.link tt.nlink
      $ ls -li tt*
      408143 0 -rw-rw-r-- 1 mythtv  mythtv    0 Nov  6 13:02 tt
      408146 0 lrwxrwxrwx 2 mythtv  mythtv    2 Nov  6 13:02 tt.hlink -> tt
      408146 0 lrwxrwxrwx 2 mythtv  mythtv    2 Nov  6 13:02 tt.link -> tt
      

      Since we can never hold symlinks open and they can never be modified in place (except for renaming them) there is no danger to move the whole symlink to the new MDT during rename instead of leaving a stub agent inode on the original MDT, except in the rare case where the link count > 1.

      Attachments

        Issue Links

          Activity

            [LU-11631] symlink migration should not create remote inodes
            pjones Peter Jones added a comment -

            Landed for 2.14

            pjones Peter Jones added a comment - Landed for 2.14

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39897/
            Subject: LU-11631 mdd: migrate symlink for cross-MDT rename
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 9adc02c016d2c0c1211274cb407637f9b49b4e09

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39897/ Subject: LU-11631 mdd: migrate symlink for cross-MDT rename Project: fs/lustre-release Branch: master Current Patch Set: Commit: 9adc02c016d2c0c1211274cb407637f9b49b4e09

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39896/
            Subject: LU-11631 obdclass: nlink is not set in struct obdo
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: a9ba4bca528938bf24ec1b172e03b24808393fb2

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39896/ Subject: LU-11631 obdclass: nlink is not set in struct obdo Project: fs/lustre-release Branch: master Current Patch Set: Commit: a9ba4bca528938bf24ec1b172e03b24808393fb2

            Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39897
            Subject: LU-11631 mdd: migrate symlink if rename is between MDTs
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: fd3cbfc62cfe84c1ed6beadc2933e67e6d1c7464

            gerrit Gerrit Updater added a comment - Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39897 Subject: LU-11631 mdd: migrate symlink if rename is between MDTs Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: fd3cbfc62cfe84c1ed6beadc2933e67e6d1c7464

            Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39896
            Subject: LU-11631 obdclass: nlink is not set in struct obdo
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 950c7dfb6b99c357a0520c42a8ad0c2762577745

            gerrit Gerrit Updater added a comment - Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39896 Subject: LU-11631 obdclass: nlink is not set in struct obdo Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 950c7dfb6b99c357a0520c42a8ad0c2762577745
            laisiyao Lai Siyao added a comment -

            Okay, I'll work on it soon.

            laisiyao Lai Siyao added a comment - Okay, I'll work on it soon.

            Lai, now that the directory split patches are starting to land, would you have time to look at this?

            This would also help avoid the creation of remote symlinks after creating and renaming temporary symlink files to change their project ID in LU-11872.

            adilger Andreas Dilger added a comment - Lai, now that the directory split patches are starting to land, would you have time to look at this? This would also help avoid the creation of remote symlinks after creating and renaming temporary symlink files to change their project ID in LU-11872 .

            Zam, any chance you could take a look at implementing this for 2.14?

            adilger Andreas Dilger added a comment - Zam, any chance you could take a look at implementing this for 2.14?

            People

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

              Dates

                Created:
                Updated:
                Resolved: