Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3626439imu; Mon, 10 Dec 2018 05:25:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/WZFdowsB/pkTNCkqdrDIjVR9K+MjVXWKv7sBLOCZlljvkgBb1rrNNbIq0W+9akV/3Rq3NP X-Received: by 2002:a62:c101:: with SMTP id i1mr12355584pfg.80.1544448310567; Mon, 10 Dec 2018 05:25:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544448310; cv=none; d=google.com; s=arc-20160816; b=jW4ytO1TNHpGzq2wBBsIg57dJ6a1UZL9voNqckp6Qn4pi9L+nArIKwNHvl/p52x9rF bL+7XjGoRv+DtqWZEoZFkY1+dlz64DT+Bq5q0FSUkFPuOYxnmuskQtLFDybwcfizf97U ezu9G7rwiKgd7DCZ5YZ+xp7nxPzjdJtrEWsS6PlQ0J7Hdl7bE70ShEhFiU46Ns6xhm5b muyp1oXgVaIiCf0RYhQ3CpK/bnpPmCQW62JgCDwYew+d4q6NeiTQ2SeBeYi03TBQ+pyb wnHpH6afRQbiWRsWgdHguhXnDxBtETJ2rKGbHXGCi+BUl7qdy1WRhbTwSkKfMBQFVoDy b1Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature; bh=XDs2DQJUSGnilMzSJhJPYQmLpzFHzLtXNZYFGFLkZqg=; b=w0Ao+w6RPvjdsFs9aSRCYzoQAfr6iemXNUfyspgq7lyvfmIVIShxP0h6oW1L+fau+K WpQrb4kb1pN6d4ew7OI3ifbyNSfw6hvUzx6Ra83vKfD3ht2vdrhirYTxVzuqag3x5nzG Wvq/rXFMBtjfaGJmVk/xyS2cCiKin+yOWdz+pCmVevY+EHyN14Tw4GZSsjWkRVI3k/EX aptuKW7TiW+gPgmH075Jux505j2mjkRi4gGW7adOrGETlbhyottGXV6MbUDlBCMPKndU WkTSLATufV8jp3JuK/6EBHxJ65lGnnWaRPI55DD+MpUXSpAqDADRa+LZQP92TbNTf9W5 1KoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@scylladb-com.20150623.gappssmtp.com header.s=20150623 header.b=qEAh0Uqu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7si9527906pgh.403.2018.12.10.05.24.54; Mon, 10 Dec 2018 05:25:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@scylladb-com.20150623.gappssmtp.com header.s=20150623 header.b=qEAh0Uqu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727296AbeLJMtt (ORCPT + 99 others); Mon, 10 Dec 2018 07:49:49 -0500 Received: from mail-wr1-f44.google.com ([209.85.221.44]:39528 "EHLO mail-wr1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727222AbeLJMts (ORCPT ); Mon, 10 Dec 2018 07:49:48 -0500 Received: by mail-wr1-f44.google.com with SMTP id t27so10331033wra.6 for ; Mon, 10 Dec 2018 04:49:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scylladb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=XDs2DQJUSGnilMzSJhJPYQmLpzFHzLtXNZYFGFLkZqg=; b=qEAh0UquYOQkdyJ2qMZFbT+4y18KYs3RL+yeYabrw4kzst/Dh2yjS5Nsi2n7hBf0U6 dKrjIJkRZrZ8yOgQVIyYEYB5z5YJOsNV/IILOailfhdfzi4D7MGKoYxk6nhtp63Nyxc6 JT3ZB7Fu5Fs8NUCqLmhS1dqcuX0luYwMuDHUKhWRmhv+GmAF4wmp753cjPqWq6cD8pdo 7haaGJaikI4ZyNDOnwP6K7bXKIE0WHDpBQyfHSAtjS7Zg/I4T8blVRL9IvZ6UN0KN54r 1YR+HHJtaYtsq+xq71bxA5iyJapokv9U7OZmWNpbkSlP0Cv7hu3C2YoIppkqI07Ks/xq 895g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=XDs2DQJUSGnilMzSJhJPYQmLpzFHzLtXNZYFGFLkZqg=; b=b6q6widu+NhWMDgYbhY05CKUBO7b2/eilsMt1KPuqlai/8Pb0j9Vuw08LGDEQJFeIK 1ZMh+fYVVIjjbz8TCvUz5bVKR23ngz3EWZ/cZqhZi4tK3hkXUeirnnTmRS7/TAWb8+qj B5wRVedq6jabvQtGTNdOWgXTgMx5WHLJl1OeLDJpUXIkJB4bHZHWQGHeohXbIgIVAB8y IlPp4dQD+zUTl2/Qglo/I+hpUnVjW8QdlncPUT9nILJUowJYqSPEcPQRl+uYPtEnJMbt 78jsqWnFiZ0z4SoVKdfFvDZs1tSlbITQrPWKnReOxkrmMYrzEYzYygDPGxjy/PI6fzBN RaLg== X-Gm-Message-State: AA+aEWZJt02cmZ43uPpKDw8i2YNe36inYIWPQRHEfWiIpZQNHe3930+w GVrvgMBsMkfafQ44Vef26X4RBg== X-Received: by 2002:a5d:6710:: with SMTP id o16mr9965080wru.152.1544446186829; Mon, 10 Dec 2018 04:49:46 -0800 (PST) Received: from avi.cloudius-systems.com (system.cloudius-systems.com. [199.203.229.89]) by smtp.gmail.com with ESMTPSA id 62sm10257091wra.30.2018.12.10.04.49.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 04:49:45 -0800 (PST) Subject: Re: Spurious EIO on AIO+DIO+RWF_NOWAIT To: Goldwyn Rodrigues Cc: linux-kernel , linux-aio@kvack.org References: <9bab0f40-5748-f147-efeb-5aac4fd44533@scylladb.com> <20181210124823.iw4mxmdqpsdfeap4@merlin> From: Avi Kivity Organization: ScyllaDB Message-ID: <53c17661-4914-5266-2034-9fc447e59383@scylladb.com> Date: Mon, 10 Dec 2018 14:49:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20181210124823.iw4mxmdqpsdfeap4@merlin> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/12/2018 14.48, Goldwyn Rodrigues wrote: > On 13:19 09/12, Avi Kivity wrote: >> I have an application that receives spurious EIO when running with >> RWF_NOWAIT enabled. Removing RWF_NOWAIT causes those EIOs to disappear. The >> application uses AIO+DIO, and errors were seen on both xfs and ext4. >> >> >> I suspect the following code: >> >> >> /* >>  * Process one completed BIO.  No locks are held. >>  */ >> static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio) >> { >>         struct bio_vec *bvec; >>         unsigned i; >>         blk_status_t err = bio->bi_status; >> >>         if (err) { >>                 if (err == BLK_STS_AGAIN && (bio->bi_opf & REQ_NOWAIT)) >>                         dio->io_error = -EAGAIN; >>                 else >>                         dio->io_error = -EIO; >>         } >> >> Could it be that REQ_NOWAIT was dropped from bio->bi_opf? or that >> bio->bi_status got changed along the way? >> > I don't think REQ_NOWAIT is dropped. I am assuming bio->bi_status error > is set differently. Is the blk queue being stopped? Not that I know of. > Is it possible to > instrument the kernel in your testcase? > I'm happy to apply patches, or run systemtap (or similar) scripts.