Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3544735ybb; Mon, 6 Apr 2020 10:45:05 -0700 (PDT) X-Google-Smtp-Source: APiQypLh4ytEC91qZIbMM3DEni/q75Geek5WKXFPumq9He8+j8+cQmgya0w0Ay7QnmLOk2j7vmaJ X-Received: by 2002:a9d:926:: with SMTP id 35mr18081404otp.319.1586195105230; Mon, 06 Apr 2020 10:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586195105; cv=none; d=google.com; s=arc-20160816; b=ursNcKUNbUtRarZcYgVQTYiypiyxRYqBpTKNVRSUMWB/JcyCwLFQ67BLs1aTc12ysY XZvLkzitJV7RyjURdc9O/CprZS8S68vt4cZ21CJSVWeuIqsUChu2hF8TOW7stsl4g0NT 9k/7kUqYLwqhpQTC3BPy+8pO0E/5sxxyPPV/kfTDSlHDStCwqlPNm8XsSUvqJNBW9md/ jFww6gK8Gj0IrV3kYvY8ZeO+zatDxTLCBToNHDTjMtyAycJnll0dmTY7gdqqSRsqjDE0 v3GRBFxRy6KHRPLp7psfWF9tOlqChtIu5/sxMGcNeuD39C4F5rzl4+DTG950cappwYLs UJzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Ar7jflrkNXaeWaLLNE+J/V0wCb3y07I41Vn1cDNa1H0=; b=R4/2MrYkH/y5kG0jFap0n/LedK80LfmmM5hZ/9TEOntFP1FqIA0sQ9ZW1Q8AUvtE8U pkIZ/1EUIW0GS8/uMZqVu7fCmIKWK3Sh2z1c6vIuVcyZzY+bJRYO60j33OhtfGC4bnqr Kv/IRYOIu21YlAZnu09XrJUpE6frXxlWHfM8dICA5chJPkh1Lww4Fv3ngiasvIpMUQjL WN3jLakVYJulEqX/3js3u+MQkwwXuLMBfmsc9m7E6jbNkfGc3NGXP3rTSQG0Ob5s7coF qmMo21ifPnMW3CtQJPx1XVMNluhsyyj+WJHXuNjBDFIHzvS1Nyo411EYVvlJiB5aV4w2 NSXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=iAyiGuOh; 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 i6si95690oor.75.2020.04.06.10.44.52; Mon, 06 Apr 2020 10:45:05 -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=pass header.i=@linux-foundation.org header.s=google header.b=iAyiGuOh; 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 S1729177AbgDFREb (ORCPT + 99 others); Mon, 6 Apr 2020 13:04:31 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:43131 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728874AbgDFREb (ORCPT ); Mon, 6 Apr 2020 13:04:31 -0400 Received: by mail-lf1-f67.google.com with SMTP id k28so57145lfe.10 for ; Mon, 06 Apr 2020 10:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ar7jflrkNXaeWaLLNE+J/V0wCb3y07I41Vn1cDNa1H0=; b=iAyiGuOhg1NBw6xntWOjfjlwN9HPSP5nDSdo7Jp3I/fwBUQ0KJFRRQOcR/HKfmVC7o qnHtvHaPJgAGeNdQfEkNAtbjCg1eAhwAJJRKbDQ3v/rLuR8aMVuXHQIiAZrb4at4+sBj MTvWffSqk+SyA3JRUrj2Z2o42xS9DNGcGc5MY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ar7jflrkNXaeWaLLNE+J/V0wCb3y07I41Vn1cDNa1H0=; b=ONWQfwgCH5eNzvqjrDgFEay+BmtwuUePJrQiZ4yyWsqEc7Z7XMLbMtdlfpmcGfraci mL94V0zSAGfW6zZ2K+CaXDn0VCgrcTstvS1sUIwrFCjgF8ppCmvD5vq8KhTwVn4Z1Kaa JnkN7hG4MUlxMBHxatrMR9jQucJUle8KVefcu17GlW0TflZL/mS6YmozeIt6dADrwrV9 4Obt1oL5Wxh88JYSiiNq0/BKEtFblP+Wdcs3jC0bRHX3WOzEYhuiHIJtFDStM7kTreNP CflApSkON9C/SAnikomHF3+HXTE6yCnDupWDUYPOGHQKP4n23183B2u5C/hbNDQ3ebaB 7L2A== X-Gm-Message-State: AGi0PuYcS3tXPuT8MG9L4a4gFp72V+YQJgBP3vzmAShJQ9kAOG/2sRPE 1qLAXeoDN/pgbCTJfOB+tt5RQK66nLY= X-Received: by 2002:ac2:5dc6:: with SMTP id x6mr1613897lfq.108.1586192669006; Mon, 06 Apr 2020 10:04:29 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id z4sm9958243ljk.51.2020.04.06.10.04.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Apr 2020 10:04:28 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id j17so71878lfe.7 for ; Mon, 06 Apr 2020 10:04:28 -0700 (PDT) X-Received: by 2002:a05:6512:14a:: with SMTP id m10mr9430308lfo.152.1586192667631; Mon, 06 Apr 2020 10:04:27 -0700 (PDT) MIME-Version: 1.0 References: <20200406110702.GA13469@nautica> <20200406164057.GA18312@nautica> <20200406164641.GF21484@bombadil.infradead.org> In-Reply-To: <20200406164641.GF21484@bombadil.infradead.org> From: Linus Torvalds Date: Mon, 6 Apr 2020 10:04:11 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] 9p update for 5.7 To: Matthew Wilcox Cc: Dominique Martinet , Linux Kernel Mailing List , linux-fsdevel , v9fs-developer@lists.sourceforge.net, Sergey Alirzaev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. So a lot of normal applications are actually used to partial reads even from file reads. 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. Linus