datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regarding the page_get_inode, thanks!

zhanghaiyang9999 opened this issue · comments

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!

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.