Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3546428ybb; Mon, 6 Apr 2020 10:47:03 -0700 (PDT) X-Google-Smtp-Source: APiQypIkf/Rg3CJfiKRAiKfieKuZ6x/D4C1C5ulAuZBzp+WPzB03zvrOwSSSEFi+dHQq/aav9JOc X-Received: by 2002:a9d:621:: with SMTP id 30mr10165952otn.194.1586195223516; Mon, 06 Apr 2020 10:47:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586195223; cv=none; d=google.com; s=arc-20160816; b=rg4jLFH+ghIj9EA374FFyQwxSZjlru4i7YOn3IFsQ9l7X3d7Gir96fV8rtt9nkYdrr T0CZg8p25VwKG5JMn5WdOMoScz/x0ZXO5201Okd2jyAD07tLkBxeUmrUHcp2VRF3egew L1mwtRL/UAYyKctLwN4xrMSFGW9DedixcbgzVKe6qYwQZL2n2CZGLdr0lQXtjbxzL1Nu Z2IevLFPWByQ5Dqw6MoY5t/7zfnlFE9LJ4zL4dENtFTc0cIkNjhT4BSDN6WBIX1ba7nO MMeD1MN28qG+ZGQGI574qWCZ+g2vy1Bpscc7q3vjCJSddH+9lisiXlrCh80Skiot3Nrv vxUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Ighi/oMVp9tFTOBbBxmTii0DJ49JmSpk0alZtgjwyEE=; b=CGS8sle30uN5NGqEo4bL6aZFGKZr9lJ/tLmlpDdBsYOs5pr/l5+dKXejuRfZLCrLob 8eDiOkrWR5JgtVjLHoRr4sYZOm0oDqhAgWJTGKz5cWiJP9o+H76UKI/DNx2Cz52iDTD7 Jc3xEj9rSNVUDzN3dYZzmD+V4osrszRROKsHd5aDQj6JmoNKp6yFcdf8hXuIrwISBBfZ h8z/SQ/iJ178DSD6taMGx5rbHPh0oEpXTZfspLpC4UwlrQom1rmrrZvo2+gWkvdT+sLx QFTYpSkJRzmMhS1m0UPjntORrWf3ceCWmV+vxWbw0n4iearYDpJik91e4nzN7WoXdy55 4UuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=A14JlXhD; 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 t125si7696815oie.167.2020.04.06.10.46.51; Mon, 06 Apr 2020 10:47:03 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=A14JlXhD; 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 S1726648AbgDFRj7 (ORCPT + 99 others); Mon, 6 Apr 2020 13:39:59 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46898 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726492AbgDFRj7 (ORCPT ); Mon, 6 Apr 2020 13:39:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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=Ighi/oMVp9tFTOBbBxmTii0DJ49JmSpk0alZtgjwyEE=; b=A14JlXhDhbCpugXDKFmJjxkAR1 3FxwFK0ASLf1JXMVK3NNyPLaPDT/3cSBQAbIvS9KC/HcKlUt0tR9PJd0dduozFawoDCEsaiog7woQ MVk6pjT8OFvdUKVaP5Pa0RUm0nQ9vgnr0R+2HwysLODLyNYep2w2v55KnJ7jUHnz311KCyPZ2wdv/ xu5Dw5wZewwIBA3kerLLfXnC0y8tVljROTKczdG1OIHFpmgYzbJ4EE1Xh4gmfaIf8zVwsucwE4q7H GfUL7yOaJr/KNw0T91jZm7VyqfkznbFBJZXE3XaNyKpAE3YSBxo4B8J6XIoRH1txvvJOkCeN0IfvZ +DPzvOJg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jLVj3-0006Ck-Jn; Mon, 06 Apr 2020 17:39:57 +0000 Date: Mon, 6 Apr 2020 10:39:57 -0700 From: Matthew Wilcox To: Linus Torvalds Cc: Dominique Martinet , Linux Kernel Mailing List , linux-fsdevel , v9fs-developer@lists.sourceforge.net, Sergey Alirzaev Subject: Re: [GIT PULL] 9p update for 5.7 Message-ID: <20200406173957.GI21484@bombadil.infradead.org> References: <20200406110702.GA13469@nautica> <20200406164057.GA18312@nautica> <20200406164641.GF21484@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 06, 2020 at 10:04:11AM -0700, Linus Torvalds wrote: > On Mon, Apr 6, 2020 at 9:46 AM Matthew Wilcox wrote: > > > > POSIX may well "allow" short reads, but userspace programmers basically > > never check the return value from read(). Short reads aren't actually > > allowed. That's why signals are only allowed to interrupt syscalls if > > they're fatal (and the application will never see the returned value > > because it's already dead). > > Well, that's true for some applications. > > But look at anybody who ever worked more with NFS mounts, and they got > used to having the 'intr' mount flag set and incomplete reads and > -EAGAIN as a result. That's why you had me implement TASK_KILLABLE ;-) > Are there apps that react badly? I'm sure - but they also wouldn't > have O_NONBLOCK set on a regular file. The only reason to set > O_NONBLOCK is because you think the fd might be a pipe or something, > and you _are_ ready to get partial reads. > > So the 9p behavior certainly isn't outrageously out of line for a > network filesystem. In fact, because of O_NONBLOCK rather than a mount > option, I think it's a lot safer than a fairly standard NFS option. The NFS option has been a no-op for over a decade ;-) I agree with you that O_NONBLOCK is a good indicator the application is willing to handle short reads (or indeed writes).