|
It looks like the reasoning behind this design choice is described in the email thread "quota: add project quota support" between the primary ext4 and XFS developers:
Rename to a destination with a different project quota gives EXDEV, same as if you were trying to rename across different filesystems. See xfs_rename().
XFS doesn't transfer the quota from projid to projid because it's borderline impossible to correctly track all the metadata allocation/free operations that can happen in a rename operation and account them to the correct quota. Hence all those corner cases are avoided by treating it as EXDEV and forcing userspace to cp/unlink the files rather than rename.
I agree that this is much more of a problem for Lustre than it is for local filesystems. As a workaround for this behavior when moving a large directory tree, it seems possible to use "lfs project" to change the project ID of the source directory to match that of the target directory before the directory is moved, at which point the "mv" operation should just be doing a rename since the project IDs will be the same for the source and target.
|