GNU bug report logs -
#25930
optimize mv for multiple bind mounts
Previous Next
Reported by: Ruediger Meier <sweet_f_a <at> gmx.de>
Date: Thu, 2 Mar 2017 09:52:01 UTC
Severity: normal
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi,
I have two bind mounts of the same filesystem
$ grep "/tmp" /etc/fstab
/dev/vg0/tmpdirs /mnt/tmpdirs ext4 acl,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 1 2
/mnt/tmpdirs/tmp /tmp none bind 0 0
/mnt/tmpdirs/var/tmp /var/tmp none bind 0 0
Using mv to move files between the bind mounts makes a slow copy:
$ time mv /var/tmp/BIGFILE /tmp/
real 0m0.622s
user 0m0.001s
sys 0m0.621s
In theory mv could know somehow that's the same filesystem
and do it like this:
$ time mv /mnt/tmpdirs/tmp/BIGFILE /mnt/tmpdirs/var/tmp/
real 0m0.004s
user 0m0.001s
sys 0m0.003s
Would it be possible to optimize mv regarding bind mounts? Or perhaps
are there other filesystems which do this better than ext4? Specially
the case that the original whole filesystem (/mnt/tmpdirs) is umounted
should work too somewhow.
cu,
Rudi
This bug report was last modified 6 years and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.