Skip to content

Whether to ensure consistency for the 'ls'? #1194

Answered by davies
Sallery-X asked this question in Q&A
Discussion options

You must be logged in to vote

To understand what happens behind ls command, you can cat the accesslog while execute ls command, here is what I got:

2021.12.21 21:34:06.707756 [uid:0,gid:0,pid:19694] opendir (1): OK [fh:77060] <0.000008>
2021.12.21 21:34:06.710774 [uid:0,gid:0,pid:19694] readdir (1,4096,0): OK (18) <0.002936>
2021.12.21 21:34:06.711609 [uid:0,gid:0,pid:19694] getattr (1): OK (1,[drwxrwxrwx:0040777,7,0,0,1610014882,1638287138,1638287138,4096]) <0.000704>
2021.12.21 21:34:06.711729 [uid:0,gid:0,pid:19694] readdir (1,4096,18): OK (0) <0.000003>
2021.12.21 21:34:06.711794 [uid:0,gid:0,pid:0] releasedir (1): OK <0.000002>

It calls opendir, readdir, readdir, releasedir. For the first readdir, JuiceFS will f…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by davies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1175 on December 23, 2021 08:56.