Move across mount,sb

2007-03-14 Thread Jan Engelhardt
Hello, touch /tmp/foo; mount /tmp /mnt --bind; strace -e rename mv /tmp/foo /mnt/bar Ideally, I would expect, that since /tmp and /mnt are the same filesystem, that the move operation would complete without _copying_ the file. But strace returns

Re: Move across mount,sb

2007-03-14 Thread Al Viro
On Thu, Mar 15, 2007 at 02:20:25AM +0100, Jan Engelhardt wrote: Why is EXDEV returned when _vfs mountpoints_ are crossed? Should not it be more like the following? error = -EXDEV; if (oldnd.mnt-mnt_sb != newnd.mnt-mnt_sb) goto exit2; No. This is