[LU-17016] rename across projects incorrectly checks source parent directory Created: 04/Aug/23 Updated: 08/Feb/24 Resolved: 04/Feb/24 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.16.0, Lustre 2.15.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Andreas Dilger |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
When renaming a directory between two different projects, in addition to (correctly) checking whether the source and target directories have the same projid, mdd_rename_sanity_check() incorrectly checks whether the source parent directory projid matches that of the target, even if the source directory itself has been changed to have the same projid as the target:
if ((((tpattr->la_flags & LUSTRE_PROJINHERIT_FL) &&
tpattr->la_projid != cattr->la_projid) ||
((pattr->la_flags & LUSTRE_PROJINHERIT_FL) &&
(pattr->la_projid != tpattr->la_projid))) &&
S_ISDIR(cattr->la_mode))
RETURN(-EXDEV);
This EXDEV return incorrectly triggers mv to recursively recreate the directory tree on the target directory, but (at least since This check of the parent projid/PROJINHERIT flag should be removed. There is no similar check in ext4_rename() for the source parent directory matching that of the target. |
| Comments |
| Comment by Andreas Dilger [ 04/Aug/23 ] |
|
"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51868 |
| Comment by Gerrit Updater [ 04/Feb/24 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51868/ |
| Comment by Peter Jones [ 04/Feb/24 ] |
|
Merged for 2.16 |