From: Konstantin Osipov <kostja.osipov@gmail.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v2] fio/coio: Handle partial writes
Date: Wed, 4 Dec 2019 14:34:47 +0300 [thread overview]
Message-ID: <20191204113447.GA6592@atlas> (raw)
In-Reply-To: <20191204111749.22115-1-gorcunov@gmail.com>
* Cyrill Gorcunov <gorcunov@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
next prev parent reply other threads:[~2019-12-04 11:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 11:17 Cyrill Gorcunov
2019-12-04 11:25 ` Cyrill Gorcunov
2019-12-04 11:34 ` Konstantin Osipov [this message]
2019-12-04 11:48 ` Cyrill Gorcunov
2019-12-04 14:35 ` [Tarantool-patches] [PATCH v3] " Cyrill Gorcunov
2020-02-20 22:10 ` Alexander Turenko
2020-02-21 12:02 ` Cyrill Gorcunov
2020-02-21 14:48 ` Alexander Turenko
2020-06-10 9:53 [Tarantool-patches] [PATCH v2] fio/coio: handle " Cyrill Gorcunov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191204113447.GA6592@atlas \
--to=kostja.osipov@gmail.com \
--cc=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v2] fio/coio: Handle partial writes' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox