Remove workaround for old Linux kernel CIFS bug - #50
Conversation
This reverts commit d42e63d.
|
Concept ACK, thanks for taking care of this - I'm all for minimizing the differences with upstream! |
|
Ping @NicolasDorier; is this still relevant to you? have you run into this issue recently? Can you test this PR on your current setup? FWIW i've synced the entire testnet4 chain to a CIFS share with the patch reverted, no problems. |
|
Is this related to torvalds/linux@6e70c26? |
That does look like it, thanks. The first release that made it into seems to be 4.17.0, released on June, 3rd 2018. $ git tag --contains 6e70c267e68d77679534dcf4aaf84e66f2cf1425|head -1
v4.17So it's been fixed for a loong time. |
|
ACK 53df05c I think this was a bug in the kernel, and filesystems which don't support
There is still a "supported" version of the kernel that lacks this patch, the 4.4 CIP SLTS kernel which will be maintained by the CIP project until 2027, although I'm not sure whether supporting CIP kernels is in-scope for Bitcoin Core, if it is, it would probably be best to submit a backport patch to the CIP mailing list. |
A long time ago (bitcoin/bitcoin#10000) we added a workaround for a Linux kernel issue where calling
fsyncon 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.