From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A4BCC433F5 for ; Tue, 18 Jan 2022 07:26:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232608AbiARH0I (ORCPT ); Tue, 18 Jan 2022 02:26:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbiARH0I (ORCPT ); Tue, 18 Jan 2022 02:26:08 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2244C061574; Mon, 17 Jan 2022 23:26:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+dhYCXllEHNKm5Sc731XzwwsjVqJhcW4C4oj7NGz3M4=; b=TGajYPjm2XkqLBdJOhVzBzTwlB boJ4d295sjI9UUInwlPKhDyuNoTCqGg0FQw18iEAahbV/VVb81mYPWPf2+b0qiATEyluQn27qsXLu 5EVgEHA+7ijXmvn4H9WVCyKxYjU5n2iMLOTjwqsd83+4PS4pEhBcGzUeq1dUTDUkcbQTongiSpChY fMZaj3W15A+CXTQEIRuyROppX7fq6If8tvRdRgQkFWIaI+wN8ZUno+UKphp83Uu8eTqHUPFrbKJbF AjzrmA/xEfJMnw5y3y5YjNzCJMWjtRHB0WCK6aAmH9OhkBqR/9ABbA+LAF3arRARXloUVo1Ubox1R 7bgznWDQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9iri-000afR-VI; Tue, 18 Jan 2022 07:25:14 +0000 Date: Mon, 17 Jan 2022 23:25:14 -0800 From: Christoph Hellwig To: Matthew Wilcox Cc: Linus Torvalds , David Howells , Alexander Viro , Anna Schumaker , Dave Wysochanski , Dominique Martinet , Jeff Layton , Latchesar Ionkov , Marc Dionne , Omar Sandoval , Shyam Prasad N , Steve French , Trond Myklebust , Peter Zijlstra , ceph-devel@vger.kernel.org, linux-afs@lists.infradead.org, linux-cachefs@redhat.com, CIFS , linux-fsdevel , Linux-MM , "open list:NFS, SUNRPC, AND..." , v9fs-developer@lists.sourceforge.net, Linux Kernel Mailing List Subject: Re: Out of order read() completion and buffer filling beyond returned amount Message-ID: References: <2752208.1642413437@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Jan 17, 2022 at 01:30:05PM +0000, Matthew Wilcox wrote: > I think for DIO, you're sacrificing the entire buffer with any filesystem. > If the underlying file is split across multiple drives, or is even > just fragmented on a single drive, we'll submit multiple BIOs which > will complete independently (even for SCSI which writes sequentially; > never mind NVMe which can DMA blocks asynchronously). It might be > more apparent in a networking situation where errors are more common, > but it's always been a possibility since Linux introduced DIO. Yes. Probably because of that we also never allow short reads or writes due to I/O errrors but always fail the whole I/O.