Skip to content

Commit 0d969fd

Browse files
committed
Merge bitpay#16: [LevelDB] Do no crash if filesystem can't fsync
c8c029b [LevelDB] Do no crash if filesystem can't fsync (Nicolas Dorier) Tree-SHA512: 26657326cef26cac28401f0c770e201dcb65cd1cf867f3f6e2149999c96881d80604b90caf3506d8425c46ebc746716473d4a2e8ade8638a08e02d31f6184b48
2 parents d40bc3f + c8c029b commit 0d969fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/env_posix.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class PosixWritableFile : public WritableFile {
231231
if (fd < 0) {
232232
s = IOError(dir, errno);
233233
} else {
234-
if (fsync(fd) < 0) {
234+
if (fsync(fd) < 0 && errno != EINVAL) {
235235
s = IOError(dir, errno);
236236
}
237237
close(fd);

0 commit comments

Comments
 (0)