-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix by_id not free when use_host_ino=true #189
Conversation
New version of rust clippy bugs |
Waiting for this #187 pr to be merged will solve the CI problem. |
src/passthrough/mod.rs
Outdated
@@ -777,7 +777,7 @@ impl<S: BitmapSlice + Send + Sync> PassthroughFs<S> { | |||
// We just removed the last refcount for this inode. | |||
// The allocated inode number should be kept in the map when use_host_ino | |||
// is false or inode is bigger than MAX_HOST_INO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the comment as well? "inode" should refer to host inode or real inode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
When use_host_ino mode is turned on, we only need to save the by_id relationship if the host inode of the file is larger than MAX_HOST_INO, and don't remove it. however, the previous code used a virtual inode combining the host inode, dev, mnt, and other parts of the file, and this inode is a 56bit inode, which is always larger than MAX_HOST_INO, and so it resulted in the by_id relationship not being cleaned up. Signed-off-by: zyfjeff <[email protected]>
When use_host_ino mode is turned on, we only need to save the by_id relationship if the host inode of the file is larger than MAX_HOST_INO, and don't remove it. however, the previous code used a virtual inode combining the host inode, dev, mnt, and other parts of the file, and this inode is a 56bit inode, which is always larger than MAX_HOST_INO, and so it resulted in the by_id relationship not being cleaned up.