misteries of find(1)

Csaba Henk csaba-ml at creo.hu
Thu Nov 24 11:40:54 GMT 2005


With fuse based filesystems I experienced find(1) giving up after
running for a while, bursting out in a series of "File does not exist"
complaints. (On the contrary, gfind just ran peacefully.)

Why so?

Well, fuse is a synthetic filesystem, where files themselves are subject
to on demand creation / garbage collection (ie., not on the vnode
level, but on the "backing storage" level, which role is played by the
userspace filesystem daemon).

As the ENOENT complaints came when file gc hit in, I conjectured that
find somehow caches name-inode mappings (which becomes invalid if a file
gets gc'd: after that, if it's asked for, it will reappear with a new
inode number). I didn't look into find or libc source code, but that's
what I think.

Now with my CURRENT system (of 13th Nov) I don't see this happening
anymore, BSD find also runs fine. I wonder what has changed... find
itself doesn't seem to have any essential commits recently.

Does anyone has an idea?


More information about the freebsd-hackers mailing list