Hacker News new | ask | show | jobs
by asveikau 1434 days ago
On top of the block layer cache there's also the namei cache for filename to inode lookups, I'm not sure if that covers a file not found case or just a success path, but it may apply here too.
2 comments

Yep, that's called a "negative dentry".
But if a negative dentry does not yet exist, and a filename is requested for the first time, does it read from the fs?

The DDoS scenario would be doing GET requests of random nonexistent filenames. You could change the name at every step so that the check for a negative dentry is never a cache hit.

If requesting http paths result in accessing the equivalent fs paths, then yes, you can dos it. But nowadays it’s uncommon for a webserver.
Well the point under discussion is that i/o from a floppy disk is slow. Most servers have much faster disks and it'd be absurd to consider this.

Also the page/buffer cache would probably cache the FAT direntries so probably not a huge issue here.

Still backed by block layer cache for (hopefully) quick response regardless of outcome
What block layer cache?
I think I was wrong, typed too quickly. There’s (potentially) a file buffer block cache available, but that’s not for caching raw disk blocks, but filesystem blocks of content.