From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A262646971A for ; Wed, 4 Dec 2019 14:34:48 +0300 (MSK) Received: by mail-lf1-f68.google.com with SMTP id 9so4373976lfq.10 for ; Wed, 04 Dec 2019 03:34:48 -0800 (PST) Date: Wed, 4 Dec 2019 14:34:47 +0300 From: Konstantin Osipov Message-ID: <20191204113447.GA6592@atlas> References: <20191204111749.22115-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191204111749.22115-1-gorcunov@gmail.com> Subject: Re: [Tarantool-patches] [PATCH v2] fio/coio: Handle partial writes List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml * Cyrill Gorcunov [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