Hacker News new | ask | show | jobs
by koverstreet 1430 days ago
Actually, no. There is no general block layer cache - the closest thing is the page cache, which is at the file level.
2 comments

Are you the Kent Overstreet working on bcachefs? If so, I've been watching it and looking forward for it to get into the kernel. Keep up the good work. I'll have a donation coming in a little while.
The one and only :)
I guess the real question there is, does a directory count as a file for the purposes of this discussion.

It seems necessary that the blocks storing the directory entries are cached too. Otherwise every non-existent lookup (that doesn't hit a negative dentry) would hit disk, each separately.

So yeah, the page cache is keyed by file, but the system should still cache the directory structure.