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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB0CCC433F5 for ; Tue, 18 Jan 2022 07:26:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EE4BE6B0072; Tue, 18 Jan 2022 02:26:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E952D6B0073; Tue, 18 Jan 2022 02:26:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5CA86B0074; Tue, 18 Jan 2022 02:26:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0002.hostedemail.com [216.40.44.2]) by kanga.kvack.org (Postfix) with ESMTP id C44596B0072 for ; Tue, 18 Jan 2022 02:26:10 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 74040181CAC5F for ; Tue, 18 Jan 2022 07:26:10 +0000 (UTC) X-FDA: 79042574100.17.3D06EBF Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf12.hostedemail.com (Postfix) with ESMTP id 79ABA40003 for ; Tue, 18 Jan 2022 07:26:09 +0000 (UTC) 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 X-Rspamd-Queue-Id: 79ABA40003 X-Stat-Signature: c4scjfeco59ex1hfo3a84sx36x7tu677 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=TGajYPjm; dmarc=none; spf=none (imf12.hostedemail.com: domain of BATV+4fe6c3c60fc7db690b35+6722+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+4fe6c3c60fc7db690b35+6722+infradead.org+hch@bombadil.srs.infradead.org X-Rspamd-Server: rspam08 X-HE-Tag: 1642490769-155001 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.