Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1191593ybg; Fri, 18 Oct 2019 13:31:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqw86AIQ/xFUEDwn3J5dhwvSrG/itFZeON6wQ14lIRoJV0W3fc9Dn1Ox/LbtOHCSRhny640l X-Received: by 2002:aa7:d389:: with SMTP id x9mr11910454edq.33.1571430716515; Fri, 18 Oct 2019 13:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571430716; cv=none; d=google.com; s=arc-20160816; b=VK1iEToxgk18CpkK09yqOCMWd3/9mCl3mDazIRTFXRcvfMFWBue9wh4TwZ8ibIfTmc NeahtNj6e7L8UyNXEToo99eOVpFHy5pcQkti52lluWIujc60rjmxwM2TYDme+J3Wo3mX ctCwL44F8ih5LJN3LdeisE6+XjqR060uY7/a/xOoeql/ZAWyE9um00fNWYGvYXKtWTVh tVKSN4ojiPcA/DQWjcYAlFAD1bFbW2TPfvZ3jryrXKO8GR6y1GdhoZScv2cyLcOeAUrE xzxfXid5qePtgIxgvH2caT4CApYM83xH5ouDoEf9DVL/6X5pYAnFKI78NXY6m7K+LJmC VpXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TFOUxuRsNFDSmRCR9ND2rTy/+oW2R7uNroTjwEuGjX0=; b=fieUp6xrlHAUme8A2+gn55QvMmidGJvAsVKJT+QNUDY3IyRa/sHcq9hx+PLAzXhN8p Vs+4by5Kxe5mhegkKGxfj8GpmvO7k2yhHoQqiLnfp32f9eze5Gu1ZPhq+fIOCs+lZPMe 4W3C3VY46tjIJoOaUkK5bsk3cnLqMNKg7TR7fMDNg+fwDV4qJwz4k3qa+fUwuJWHjTTq MKl5JNBE7w2jfT3RSwqGp2eg4AqziZVnm053mDHg0FX00GvUaJ6Oh25ckhDNaFjEiAVu TOY9gc+C8IK6x/TuJMHEUBhkJxdA+ZHbVdlbfNUW6v9oBAB1dcem3hzq1zo741FMhH0+ brWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-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 by16si4272854edb.30.2019.10.18.13.31.31; Fri, 18 Oct 2019 13:31:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391482AbfJQPWx (ORCPT + 99 others); Thu, 17 Oct 2019 11:22:53 -0400 Received: from fieldses.org ([173.255.197.46]:37404 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391285AbfJQPWx (ORCPT ); Thu, 17 Oct 2019 11:22:53 -0400 Received: by fieldses.org (Postfix, from userid 2815) id 4296F1C83; Thu, 17 Oct 2019 11:22:53 -0400 (EDT) Date: Thu, 17 Oct 2019 11:22:53 -0400 From: "J. Bruce Fields" To: Rick Macklem Cc: "Kornievskaia, Olga" , "linux-nfs@vger.kernel.org" , "nfsv4@ietf.org" Subject: Re: NFSv4.2 server replies to Copy with length == 0 Message-ID: <20191017152253.GG32141@fieldses.org> References: <20191016155838.GA17543@fieldses.org> <31E6043B-090D-4E37-B66F-A45AC0CFC970@netapp.com> <20191016203150.GC17543@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Oct 17, 2019 at 02:16:36AM +0000, Rick Macklem wrote: > I have now found two cases where the Linux NFSv4.2 server does not > conform to RFC-7862. One is as above and the other is a reply to Seek > of NFS4ERR_NXIO when the sa_offset argument == file_size (instead of > replying NFS_OK along with sr_eof == true). Huh. Looks like that's documented behavior of Linux's seek. (See the ERRORS section of the lseek(2) man page.) Looks like Solaris also returns -ENXIO in this case: https://docs.oracle.com/cd/E26502_01/html/E29032/lseek-2.html And freebsd too: https://www.freebsd.org/cgi/man.cgi?query=lseek&sektion=2 I wonder where that spec language came from? Our NFS server could translate an -ENXIO return into 0 and sr_eof == true easily enough, assuming -ENXIO is really only ever returned in that case. I haven't tested, but from a quick check of the Linux client code I think that would require a matching fix on the client side to translate sr_eof == 0 *back* to ENXIO. I don't know if it's worth it. --b.