aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/prim_file_nif.c
AgeCommit message (Collapse)Author
2019-01-09Merge branch 'maint'John Högberg
* maint: Remove an unused variable Spawn prim_file helper as a system process
2019-01-08Remove an unused variableJohn Högberg
2018-12-18Merge branch 'maint'Sverker Eriksson
2018-12-13erts: Fix warning and potential big-endian-bug in prim_fileSverker Eriksson
for set_permission and set_owner.
2018-12-03Merge branch 'maint'Lukas Larsson
2018-12-03erts: Fix some 32-bit gcc warningsLukas Larsson
2018-11-16Merge branch 'maint'John Högberg
* maint: Fix broken assertion on monitor release Avoid closing files in gc/monitor callbacks
2018-11-13Avoid closing files in gc/monitor callbacksJohn Högberg
Closing files in these callbacks could block scheduler progress and cause major system instability. We now defer these operations to a dedicated process instead. This process may in turn block forever and prevent further orphaned files from being closed, but it will keep the emulator itself from misbehaving.
2018-10-12Merge branch 'maint'Rickard Green
* maint: Updated OTP version Prepare release erts: Fix UNC path handling on Windows erts: Fix a compiler warning eldap: Fix race at socket close Fix bug for sockopt pktoptions on BSD erts: Fix memory leak on file read errors
2018-09-26erts: Fix memory leak on file read errorsJohn Högberg
2018-09-25erts: Remove unnecessary NIF argc testsSverker Eriksson
It's impossible to call NIF with wrong argc from Erlang and thus pointless to throw badarg.
2018-06-18Update copyright yearHenrik Nord
2018-03-19Fix file:change_group/change_ownerJohn Högberg
It wasn't possible to change group/owner separately, and our test suite lacked coverage for that. ERL-589
2017-11-30Reimplement efile_drv as a dirty NIFJohn Högberg
This improves the latency of file operations as dirty schedulers are a bit more eager to run jobs than async threads, and use a single global queue rather than per-thread queues, eliminating the risk of a job stalling behind a long-running job on the same thread while other async threads sit idle. There's no such thing as a free lunch though; the lowered latency comes at the cost of increased busy-waiting which may have an adverse effect on some applications. This behavior can be tweaked with the +sbwt flag, but unfortunately it affects all types of schedulers and not just dirty ones. We plan to add type-specific flags at a later stage. sendfile has been moved to inet_drv to lessen the effect of a nasty race; the cooperation between inet_drv and efile has never been airtight and the socket dying at the wrong time (Regardless of reason) could result in fd aliasing. Moving it to the inet driver makes it impossible to trigger this by closing the socket in the middle of a sendfile operation, while still allowing it to be aborted -- something that can't be done if it stays in the file driver. The race still occurs if the controlling process dies in the short window between dispatching the sendfile operation and the dup(2) call in the driver, but it's much less likely to happen now. A proper fix is in the works. -- Notable functional differences: * The use_threads option for file:sendfile/5 no longer has any effect. * The file-specific DTrace probes have been removed. The same effect can be achieved with normal tracing together with the nif__entry/nif__return probes to track scheduling. -- OTP-14256