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

Handle NODATASUM better with DATA_RELOC inode #27

Open
josefbacik opened this issue Feb 18, 2022 · 0 comments
Open

Handle NODATASUM better with DATA_RELOC inode #27

josefbacik opened this issue Feb 18, 2022 · 0 comments

Comments

@josefbacik
Copy link
Contributor

Currently when we do the DATA_RELOC inode we'll copy in data extents to the reloc inode, and then copy them back to where they belong. However if we evict those pages we'll have to re-read them from the DATA_RELOC inode.

If we are relocating a NODATASUM extent this won't have checksums, however we don't keep track of that anywhere, so we treat any missing checksum on a DATA_RELOC inode as being part of an inode that had NODATASUM set.

This is definitely the normal case, however there could be a bug where we really should have a csum, and we won't know there was a problem until we go to re-read the original inode and can no longer find the csum for that inode.

We should fix this to look up the inode we're relocating the data for and check and see if it's got NODATASUM set, and then set NODATASUM on the range for the DATA_RELOC inode. This way we won't actually try to look up the csum for this range in the first place, and then we can treat any missing csum at read time as a real bug.

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

1 participant