Skip to content
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

Regarding the page_get_inode, thanks! #263

Open
zhanghaiyang9999 opened this issue Dec 2, 2021 · 1 comment
Open

Regarding the page_get_inode, thanks! #263

zhanghaiyang9999 opened this issue Dec 2, 2021 · 1 comment

Comments

@zhanghaiyang9999
Copy link

HI, I have a question to ask for help.

in function page_get_inode, will return the inode via pg->mapping->host
If the file corresponds to the inode(pg->mapping->host) just been removed when calling the page_get_inode function, what's the result? the pg->mapping->host is null or other value? thanks!

@dakotarwilliams
Copy link
Contributor

It going to depend on the page cache. If it's synchronized, then the mapping should be null. If for some reason, there's a race, then it should have the old inode value (which isn't great since we could miss recording that a write happened). In our case, this doesn't matter that much since we're only checking against the inode of our cow file, and if that disappears, the snapshot is no good anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants