Remove workaround for old Linux kernel CIFS bug #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A long time ago (bitcoin/bitcoin#10000) we added a workaround for a Linux kernel issue where calling
fsync
on a directory would instantly and reliably fail for CIFS mounts. In 2018 i ported this forward to the new leveldb tree (d42e63d) without checking if it would still be necessary. Nearly a decade later it's time to reevaluate this.This is an ugly workaround (always intended to be temporary) as the code isn't written specifically: If directory sync fails on a correctly working filesystem it ignores this as well, potentially ignoring a real problem. Although checking for errno==EINVAL partially mitigates this, it would be preferable to get rid of it. See also google#1262 .
So just today i did some experiment to check:
and ran this on a CIFS share:
At least at first glance (some more testing might or might not be warranted), the original problem doesn't appear to exist anymore.
Versions:
This reverts commit d42e63d.