On 02/07/2017 08:26 PM, Goffredo Baroncelli wrote: > I found the problem. I using btrfs as my filesystem, which has an > inconsistency between /proc/self/mountinfo and stat.
aha, and I had almost already wanted you to ask if you are using weird file system types ... ;-) > $ cat /proc/self/mountinfo | grep btrfs > 20 0 0:18 /debian / rw,noatime,nodiratime shared:1 - btrfs /dev/sdc3 > rw,ssd,space_cache,subvolid=257,subvol=/debian > 73 20 0:18 /boot /boot rw,noatime,nodiratime shared:29 - btrfs /dev/sdc3 > rw,ssd,space_cache,subvolid=299,subvol=/boot > 75 20 0:18 / /var/btrfs rw,noatime,nodiratime shared:30 - btrfs /dev/sdc3 > rw,ssd,space_cache,subvolid=5,subvol=/ > $ stat / > File: / > Size: 280 Blocks: 0 IO Block: 4096 directory > Device: 14h/20d Inode: 256 Links: 1 > Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) > Access: 2015-09-06 12:06:36.151128298 +0200 > Modify: 2017-01-15 22:44:46.869717588 +0100 > Change: 2017-01-15 22:44:46.869717588 +0100 > Birth: - > > /proc/self/mountinfo for "/" has 0:18, but stat shows 0:20 > > $ stat /boot/ > File: /boot/ > Size: 1202 Blocks: 0 IO Block: 4096 directory > Device: 2bh/43d Inode: 256 Links: 1 > Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) > Access: 2015-08-29 13:21:52.035986005 +0200 > Modify: 2017-02-05 00:18:07.351236324 +0100 > Change: 2017-02-05 00:18:07.351236324 +0100 > Birth: - > > /proc/self/mountinfo for "/boot" has 0:18, but stat shows 0:43 > > > (See for further detail > > https://www.spinics.net/lists/linux-btrfs/msg58908.html) > > So apart the leak, "find" under btrfs has bad performance due to the > inconsistency between /proc/self/mountinfo and stat().. Okay, so for btrfs, the cache function obviously doesn't work based on st_dev. I have to think about how to work around that - it's a pity we have to single out special file system types ... Have a nice day, Berny _______________________________________________ Findutils-patches mailing list [email protected] https://lists.gnu.org/mailman/listinfo/findutils-patches
