[Tarantool-patches] [PATCH v2] fio/coio: Handle partial writes

Konstantin Osipov kostja.osipov at gmail.com
Wed Dec 4 14:34:47 MSK 2019


* Cyrill Gorcunov <gorcunov at gmail.com> [19/12/04 14:21]:
> +static inline int
> +write_should_retry(void)
> +{
> +	/* Retry on O_NONBLOCK */
> +	if (errno == EAGAIN)
> +		return true;

Usually you add EWOULDBLOCK here too.

> +	/* Retry if been interrupted */
> +	if (errno == EINTR)
> +		return true;

Not sure you should handle this. It's up to the client whether to
make or not a write interruptible, it is managed by fcntl. 
Otherwise you may block indefinitely inside a syscall.



-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list