3 ms·
when you interact with a file or directory, the mapping of that logical thing to disk inodes (which are the physical 4kb whatevers you speak of) is managed for
by preseinger 4y ago
when you interact with a file or directory, the mapping of that logical thing to disk inodes (which are the physical 4kb whatevers you speak of) is managed for you by the fs cache
that cache coalesces and serializes access to disk, it does all of this "locking" you're referring to, and it's very smart
it seems like you're writing code assuming this intermediating layer does not exist?