[LU-11631] symlink migration should not create remote inodes Created: 06/Nov/18 Updated: 21/Nov/20 Resolved: 29/Oct/20 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.8.0, Lustre 2.13.0, Lustre 2.10.6 |
| Fix Version/s: | Lustre 2.14.0 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Andreas Dilger | Assignee: | Lai Siyao |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Rank (Obsolete): | 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. |
| Comments |
| Comment by Andreas Dilger [ 21/Mar/20 ] |
|
Zam, any chance you could take a look at implementing this for 2.14? |
| Comment by Andreas Dilger [ 24/Apr/20 ] |
|
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 |
| Comment by Lai Siyao [ 26/Apr/20 ] |
|
Okay, I'll work on it soon. |
| Comment by Gerrit Updater [ 14/Sep/20 ] |
|
Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39896 |
| Comment by Gerrit Updater [ 14/Sep/20 ] |
|
Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39897 |
| Comment by Gerrit Updater [ 25/Sep/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39896/ |
| Comment by Gerrit Updater [ 29/Oct/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39897/ |
| Comment by Peter Jones [ 29/Oct/20 ] |
|
Landed for 2.14 |