From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (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 BAFD246971A for ; Wed, 4 Dec 2019 14:26:01 +0300 (MSK) Received: by mail-lj1-f196.google.com with SMTP id k8so7653623ljh.5 for ; Wed, 04 Dec 2019 03:26:01 -0800 (PST) Date: Wed, 4 Dec 2019 14:25:58 +0300 From: Cyrill Gorcunov Message-ID: <20191204112558.GL10140@uranus> 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: tml On Wed, Dec 04, 2019 at 02:17:49PM +0300, Cyrill Gorcunov wrote: ... > +static inline int > +write_should_retry(void) > +{ > + /* Retry on O_NONBLOCK */ > + if (errno == EAGAIN) > + return true; > + /* Retry if been interrupted */ > + if (errno == EINTR) > + return true; > + /* Unexpected error */ > + return false; > +} Guys, I just thought, previously if the file we're writting to has been opened with o_nonblock and eagain happened we were returning an error. With this patch we gonna retry write operation, and this changes behaviour. Maybe I should consider EINTR only?