开发者

Difference between reading a directory(readdir) and a lookup operation on the directory

开发者_运维技巧

Would be very gratefull to know about how the operations, reading directory say using readdir() different from a directory lookup performed while resolving a path to a file/directory. How different are they in the logic of their implementation? Will higly appreciate any references to literature too.

I am also not knowing exactly how to find out how atomicity of filesystem operations are guarateed if they are at all.

the file system i refer here is the extfs family.

Thanks


The most definitive resource would be the kernel source code. For ext4fs, lookup is implemented in ext4_lookup, and readdir in ext4_readdir.

From a user-space perspective, the biggest difference is that lookup/traversal requires the execute permission bit, while readdir requires the read permission bit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜