From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (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 4E54046971A for ; Wed, 4 Dec 2019 14:48:12 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id 21so7771027ljr.0 for ; Wed, 04 Dec 2019 03:48:12 -0800 (PST) Date: Wed, 4 Dec 2019 14:48:08 +0300 From: Cyrill Gorcunov Message-ID: <20191204114808.GM10140@uranus> References: <20191204111749.22115-1-gorcunov@gmail.com> <20191204113447.GA6592@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191204113447.GA6592@atlas> 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: Konstantin Osipov Cc: tml On Wed, Dec 04, 2019 at 02:34:47PM +0300, Konstantin Osipov wrote: > * 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. True. It somehow escaped from the drafts while I've been merging the series of fixes. Thanks! > > + /* 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. OK, thanks, will drop.