Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp926193pxb; Thu, 9 Sep 2021 15:34:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJJdqnUT7AMWzpt4DKko9KQRcXFmvESOc0pWHrZsZWWoKjSDlLnrJTqUAkdrQeyekspPGF X-Received: by 2002:a05:6402:1d36:: with SMTP id dh22mr5532513edb.16.1631226847257; Thu, 09 Sep 2021 15:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631226847; cv=none; d=google.com; s=arc-20160816; b=aenZxrSJl3Js+dFhrniarADxCuCJ/KtSH95WsITfCICMg2o+tGujspDnPsar4T0Sbs Gq2hcQm3c8ElciVQihuMKz/0fFUVZ1B4kOjQipigyRQBPQgyJr+kfrK6QCReczxYV7pg DaPdJPjve6j4yVQka8QjBuRrDxWNix6Ud1l0rCz/WknOExPMxtp++mP8EFNkfgzCVqrh rmWXbameN3rUvs96HN8fBRm5mPZTm0mTNHVDqK6St1w19vBR8NO4PXGh+/DnaqwjELad vIHefcZXcG5zFtkhKHPMXDdnK/ZV7P/sL/OHXpl6eapDSHLiaSK4yRyyh06hgFkjggui vv1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=AQfOJjsY2mqUY6ZN9iWIIq+zNj1UqOlL5EmNkpJAbu4=; b=V1bXDcQqU1m6VFPAJPHCEc3FGrYaqZETSKD9ESFp7UWH3wff8t9TcmCao93Fyqq0hD 5zyxDyV1UoNM4z5jJRiwS1tToWO3kH/O35i0tSFar7RiC2pec6XN1+ps1oWS8Acn3dNK FsoKjrcgNvMsUgJuDrQgFl1mBBxjMgb3fZdKYNaMYYz4KMkOWASPb6X2A0WSkSKDVPms WNGGYaOSqp6HXH4jiJSmfLCFE0zesWStEIuyjtgE+UCy3LZE2mVAVIREJu3Hp6Snq3zZ kKCJDWnLe5fOn5Xx7b3fopAunCnPz8UQ4Mrx2XCD0GiNk40KWZGBwH4LdH6MBmMjqJ7g 2ccg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hx26si3229360ejc.732.2021.09.09.15.33.43; Thu, 09 Sep 2021 15:34:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347511AbhIIVnX (ORCPT + 99 others); Thu, 9 Sep 2021 17:43:23 -0400 Received: from mail108.syd.optusnet.com.au ([211.29.132.59]:48728 "EHLO mail108.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347347AbhIIVnT (ORCPT ); Thu, 9 Sep 2021 17:43:19 -0400 Received: from dread.disaster.area (pa49-195-238-16.pa.nsw.optusnet.com.au [49.195.238.16]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 0D78D1B9E7B; Fri, 10 Sep 2021 07:42:06 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1mORo5-00Ad4S-EJ; Fri, 10 Sep 2021 07:42:05 +1000 Date: Fri, 10 Sep 2021 07:42:05 +1000 From: Dave Chinner To: Jens Axboe Cc: Linus Torvalds , Al Viro , Pavel Begunkov , Linux Kernel Mailing List , linux-fsdevel Subject: Re: [git pull] iov_iter fixes Message-ID: <20210909214205.GH1756565@dread.disaster.area> References: <5971af96-78b7-8304-3e25-00dc2da3c538@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5971af96-78b7-8304-3e25-00dc2da3c538@kernel.dk> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=Tu+Yewfh c=1 sm=1 tr=0 a=DzKKRZjfViQTE5W6EVc0VA==:117 a=DzKKRZjfViQTE5W6EVc0VA==:17 a=kj9zAlcOel0A:10 a=7QKq2e-ADPsA:10 a=7-415B0cAAAA:8 a=JUD6rjD155hWDKwpWEIA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 09, 2021 at 03:19:56PM -0600, Jens Axboe wrote: > On 9/9/21 1:37 PM, Linus Torvalds wrote: > > I'd like the comments expanded too. In particular that > > > > /* some cases will consume bytes even on error returns */ > > That comment is from me, and it goes back a few years. IIRC, it was the > iomap or xfs code that I hit this with, but honestly I don't remember > all the details at this point. I can try and play with it and see if it > still reproduces. You might well be thinking of the problem fixed by commit 883a790a8440 ("xfs: don't allow NOWAIT DIO across extent boundaries"). This fix was indicative of a whole class of issues with IOCB_NOWAIT being used for multi-IO operations at the filesystem level and being applied to each sub-segment of the IO that was constructed, rather than the IO as a whole. Hence a failure on the second or subsequent segments could return -EAGAIN (and potentially other errors) to the caller after the segments we successfully submitted consumed part of the iov... Cheers, Dave. -- Dave Chinner david@fromorbit.com