Why does juicefs implement its own openfiles logic to determine whether to set the keep-cache attribute of a file? #4500
Unanswered
daimashusheng
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According to linux kernel fuse related code, in CAP_AUTO_INVAL_DATA mode, if the size or modification time of the file has changed when it is read again, the kernel will automatically clear the previous page cache, so as to read the real content of the file. Therefore, if juicefs directly set keep-cache to true, we can let the kernel to automatically clear the expired page cache, I do not know why juicefs also implement its own openfiles logic to determine whether to set the keep-cache attribute of a file?
This is source code for linux kernel fuse to determine if page cache is valid.
or https://github.com/torvalds/linux/blob/master/fs/fuse/inode.c#L340
Beta Was this translation helpful? Give feedback.
All reactions