]> dgit.raspbian.org Git - git-annex.git/commit
fsck: Detect and correct stale or missing inode caches for object files
authorJoey Hess <joeyh@joeyh.name>
Thu, 29 Jul 2021 18:06:13 +0000 (14:06 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 29 Jul 2021 18:06:42 +0000 (14:06 -0400)
commitd2aead67bd17faac753ccf41964789a3a62ddaf3
treefbb00fd00064c4f36cedd43434d592b384d36188
parent817ccbbc47156c24aade4c6c4dc0c195332a991e
fsck: Detect and correct stale or missing inode caches for object files

An easy way to see this in action is to have an unlocked file, and touch the
object file.

While all code that compares inode caches for object files needs to be
prepared for this kind of problem and fall back to verification, having
fsck notice it and correct it is cheap (as long as fsck is being run
anyway) and ensures that if it happens for some unusual reason, there's a
way for the user to notice that it's happening.

Not that, when annex.thin is in use, the earlier call to isUnmodified
(and also potentially earlier calls to inAnnex in eg, verifyLocationLog)
will fix up the same problem silently. That might prevent the warning
being displayed, although probably it still will be, because the
Database.Keys write of the InodeCache will be queued but will not have
happened yet. I can't see a way to improve this, but it's not great.

Sponsored-by: Dartmouth College's Datalad project
CHANGELOG
Command/Fsck.hs
doc/bugs/__34__failed_to_send_content_to_remote__34__/comment_24_4345e2d7f30318dc7565e90ac8578086._comment [new file with mode: 0644]