The OS does have to read the inode on unlink
, but of course it unfortunately doesn’t return any of the info from the deleted inode to the unlink
caller. We have to call stat
separately. I’m not sure why a subsequent unlink
doesn’t read the inode from cache at that point, but some profiling (on ext4+linux) suggests that it does not, in at least some cases. Maybe for something like a delete, a cached inode is not good enough? I haven’t gone into depth here.
This hadn’t occurred to me. I was under the impression most people ran their nodes with a much higher RLIMIT_NOFILE. Is 1024 even enough to run a fair-sized node in normal operation?