On 16/08/2018 23:41, Vladislav Vaintroub wrote:
I think it is up to the OS kernel how to handle interrupt request
when a system call is in progress. If kernel reacts to
signals/exceptions by interrupting write() call in the middle of
copying data from your buffer to the page cache, nothing would help.
And what means “in the middle”, is also unclear. There would be some
kind of granularity (page size in pagecache maybe). I do not know what
different kernels do in such cases, but this the is level where ZFS is
not involved at all.
Well, the manual [1] seems quite explicit about the possibility to have
write() interrupted by a signal (and, by extension, due to a process
crash):
"If a write() is interrupted by a signal handler before any bytes are
written, then the call fails with the error EINTR; if it is interrupted
after at least one byte has been written, the call succeeds, and returns
the number of bytes written."
With such a premise, do you think disabling doublewrite still be safe?
Thanks.
[1] https://linux.die.net/man/2/write