Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1975942pxk; Tue, 1 Sep 2020 12:19:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0AdbAK/TN4PAbEibNsNqTv9s786UqPxdXFlB/SMHyx3jNOaKaWnQBDVYnO+35v+TJ6PNf X-Received: by 2002:a17:907:72cd:: with SMTP id du13mr3203208ejc.67.1598987972910; Tue, 01 Sep 2020 12:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598987972; cv=none; d=google.com; s=arc-20160816; b=Mf4jJysywNCWcRFrCqsN1EMHZijviUO0UG6mNXVK7WcPVBx7W5ZxAug+ZFyKhXmGvH pUCM3z46wbGyltuokiP1FwIdTySjvEGgnn1gjO3BmQTMtFEid6BJmuBYg84JcXEU0Tlk Sul+X3xXHgDp5kSo61ChTAS2JnaSgx2PHm0r1tNVq9nfBz7IgKLmZRercW5caqiik8O+ 16l/8x0W1hjp3XppuEA6aifiUerxeuCOV7qhglrTnaDVzS3lZPG7QaQdqK6lvbRRjWdQ IdGke0iqrKJShS/K+hwVq4lXYwbdWz53D4pJYW2N/8e3Yk06gTnPIfOvdBVbwel8vlDL fl0A== 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:dkim-signature:dkim-filter; bh=1/0q7fnxeeAC3t8KuZliK4V55iKTBSIt8BXbGxbVV6g=; b=X+cUOTdpG0ZpVmGSmr17TduX4n/g6zDgPl+YSvyKW1dfGTnLfKwoiaBuO44cdeQA9A hOnoeapSQ/itHGNDDiu404XnkzY/hSqnd3uURztHlokUAr3Kt+xycWjZXZQUbX8Zn1BJ leIO6HyWS8AfGrifZKQzxvL59PLngkMYyRMFvbImpkYwJHdlTqYNmZeHEClO2LKnrJho O4ZenqjbeaylTQRUoG2oE3vCNiQCOmCG82nLTB2UhZSXVJmooKce1KtL36R0zzBJePLR nN6CHC9YRZrYFoiIIXwq66hmZasJwtma655WFG5EMKeNEv0LMdpL4DIpEYbZ1Xfpu/uc 5IQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=frA9yW8f; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si1172829edu.323.2020.09.01.12.18.58; Tue, 01 Sep 2020 12:19:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=frA9yW8f; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726144AbgIATS4 (ORCPT + 99 others); Tue, 1 Sep 2020 15:18:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731576AbgIATS4 (ORCPT ); Tue, 1 Sep 2020 15:18:56 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA4BAC061244 for ; Tue, 1 Sep 2020 12:18:55 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 42BFF5F98; Tue, 1 Sep 2020 15:18:54 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 42BFF5F98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1598987934; bh=1/0q7fnxeeAC3t8KuZliK4V55iKTBSIt8BXbGxbVV6g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=frA9yW8fUW6LKsN7Jj1vkavkQ/jEnnqSexecRdZeeAfssWV/+muzAb0u5HLBwsEzH LcFJY0T4u48c91CqQIUDycXAzJhTBuXBYMDFyH3dGLgBpAV1G4GsvKGilglkDyflfx L9uZmCgnXmpVeU0M0B+b/BLfEvxjWzQRLlxR6lq8= Date: Tue, 1 Sep 2020 15:18:54 -0400 From: "J. Bruce Fields" To: Anna Schumaker Cc: "J. Bruce Fields" , Chuck Lever , Linux NFS Mailing List Subject: Re: [PATCH v4 2/5] NFSD: Add READ_PLUS data support Message-ID: <20200901191854.GD12082@fieldses.org> References: <20200817165310.354092-1-Anna.Schumaker@Netapp.com> <20200817165310.354092-3-Anna.Schumaker@Netapp.com> <20200828212521.GA33226@pick.fieldses.org> <20200828215627.GB33226@pick.fieldses.org> <20200901164938.GC12082@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 Tue, Sep 01, 2020 at 01:40:16PM -0400, Anna Schumaker wrote: > On Tue, Sep 1, 2020 at 12:49 PM J. Bruce Fields wrote: > > > > On Mon, Aug 31, 2020 at 02:16:26PM -0400, Anna Schumaker wrote: > > > On Fri, Aug 28, 2020 at 5:56 PM J. Bruce Fields wrote: > > > > We really don't want to bother encoding small holes. I doubt > > > > filesystems want to bother with them either. Do they give us any > > > > guarantees as to the minimum size of a hole? > > > > > > The minimum size seems to be PAGE_SIZE from everything I've seen. > > > > OK, can we make that assumption explicit? It'd simplify stuff like > > this. > > I'm okay with that, but it's technically up to the underlying filesystem. Maybe we should ask on linux-fsdevel. Maybe minimum hole length isn't the right question: suppose at time 1 a file has a single hole at bytes 100-200, then it's modified so at time 2 it has a hole at bytes 50-150. If you lseek(fd, 0, SEEK_HOLE) at time 1, you'll get 100. Then if you lseek(fd, 100, SEEK_DATA) at time 2, you'll get 150. So you'll encode a 50-byte hole in the READ_PLUS reply even though the file never had a hole smaller than 100 bytes. Minimum hole alignment might be the right idea. If we can't get that: maybe just teach encode_read to stop when it *either* returns maxcount worth of file data (and holes) *or* maxcount of encoded xdr data, just to prevent a weird filesystem from triggering a bug. --b.