Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1199916pxb; Thu, 4 Mar 2021 06:03:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzug4A9QNf3Kuw4famotbYS7np10Ys1whRLmieC1hh351RMojUAtc3PnW2ecX8N3DLyhPa7 X-Received: by 2002:a17:906:4705:: with SMTP id y5mr4425603ejq.119.1614866581667; Thu, 04 Mar 2021 06:03:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614866581; cv=none; d=google.com; s=arc-20160816; b=Q8ZbUvuSJYM2J7f8Gb8mHgiSXtsi1GRNUdF6syv2XzIYYTFoxtiHHmK4WOWynr/R08 rixBi5QzDl+QoO3R0z4Lzo0nExqSM1DWWAz8qgU6FKkf2/u5YcRHKtvB7kgUiZKyHXtE k0pDzdmChTvcmSrVB8kB32Zhppn3ow32Tu7ZH2zktwfO48rK4ekDz0mqBrtThvSHmNtl 9f285QrwHah48HYVQjTCiwmpbyMTf4h99hc7yA/ihwRQXe7AmEjcIcV80cLOvysJA542 q0XMr5qv5lbsDOc4LHNIwuC9hIlKV5/HaaGSe4dRb+aRgqGVVteHTHqq9wLIIJG/SuZS 6E7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=uE6y/NN26t2PtuXvWcwN+Rv+MpWB2IrYuaEcnV6QzmU=; b=WeSR733aphRJzRArNG0tEUEPSbj7YTVvZm8QFHePmiEZrrW9mX6xuq+Ld7FsZgNWXe mCfLenw/ixFEG6Q9jngv+khk+YT3y2mTDkrEwxOtn0S2rJU4iR6NHhoeb4sc+/nNKHWX h2P7XMUZIAcNV1a0yCouXwIOvry9iMREdDJrMMmVBi13VkZnOrR1dC9zSGcucnH8Pqux uJzN3awSAYzyV9gS+e8Qd4SzB8omOL+k2/Nhh55aB4ack1g8ObMFejwNBjBHi7jLWFUD hVwDzFM1tRM8bn4nQwKvxvoabntcbE/gC7IN0/dtISiHWwqqAYoUV5j3tHyvTUPrGm84 Fdqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=dG5NLtKz; 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 y16si17072568edq.523.2021.03.04.06.02.38; Thu, 04 Mar 2021 06:03:01 -0800 (PST) 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=dG5NLtKz; 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 S1451072AbhCDA3r (ORCPT + 99 others); Wed, 3 Mar 2021 19:29:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239064AbhCCSjF (ORCPT ); Wed, 3 Mar 2021 13:39:05 -0500 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C47E9C06175F for ; Wed, 3 Mar 2021 10:38:23 -0800 (PST) Received: by fieldses.org (Postfix, from userid 2815) id 127DA2824; Wed, 3 Mar 2021 13:38:23 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 127DA2824 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1614796703; bh=uE6y/NN26t2PtuXvWcwN+Rv+MpWB2IrYuaEcnV6QzmU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dG5NLtKz1a0wGWpdCxUSXqC/EXSsE4xK3dWcLW8ZeTWFaYLuLro37MPL1TJESbJbf fBx4UI7QSUZOKI+jB1i9JtdF7H+CVcXm8oxaMAVEpxoFtkfEllKBJCrXSpyF41ZD56 bHMuT5tNaMRh7bX+K5CIsh1hitDlbMV1LFNk35+U= Date: Wed, 3 Mar 2021 13:38:23 -0500 From: Bruce Fields To: Chuck Lever Cc: Linux NFS Mailing List Subject: Re: [PATCH v1 19/42] SUNRPC: Fix xdr_get_next_encode_buffer() page boundary handling Message-ID: <20210303183823.GD1282@fieldses.org> References: <161461145466.8508.13379815439337754427.stgit@klimt.1015granger.net> <161461183307.8508.17196295994390119297.stgit@klimt.1015granger.net> <20210302221130.GG3400@fieldses.org> <592A34CB-C178-4272-8905-F3BA95BCE299@oracle.com> <20210303165251.GB1282@fieldses.org> <20210303182546.GC1282@fieldses.org> <0908A838-D518-4F81-B6EA-8C088D5538E9@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0908A838-D518-4F81-B6EA-8C088D5538E9@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Mar 03, 2021 at 06:30:40PM +0000, Chuck Lever wrote: > > > > On Mar 3, 2021, at 1:27 PM, Chuck Lever wrote: > > > > > > > >> On Mar 3, 2021, at 1:25 PM, Bruce Fields wrote: > >> > >> On Wed, Mar 03, 2021 at 06:19:33PM +0000, Chuck Lever wrote: > >>> > >>> > >>>> On Mar 3, 2021, at 11:52 AM, Bruce Fields wrote: > >>>> > >>>> On Wed, Mar 03, 2021 at 03:43:28PM +0000, Chuck Lever wrote: > >>>>> Why would that not be OK? the next call to xdr_get_next_encode_buffer() > >>>>> should do the right thing and bounce the new encoded data from the > >>>>> next page into this one again. > >>>>> > >>>>> So far I have not encountered any problems. Would such a problem show > >>>>> up with some frequency under normal use, or would it be especially > >>>>> subtle? > >>>> > >>>> I mainly just want to make sure we've got a coherent idea what this code > >>>> is doing.... > >>> > >>> Agreed, that's a good thing. > >> > >> I'm also a little vague on what exactly the problem is you're running > >> into. (Probably because I haven't really looked at the v3 readdir > >> encoding.) > >> > >> Is it approaching the end of a page, or is it running out of buflen? > >> How exactly does it fail? > > > > I don't recall exactly, it was a late last summer when I wrote all these. > > > > Approaching the end of a page, IIRC, the unpatched code would leave > > a gap in the directory entry stream. > > Well, when I converted the entry encoders to use xdr_stream, it would > have a problem around the end of a page. The existing encoders are > open-coded to deal with this case. We're not seeing v4 readdir bugs, though, I wonder what's different? --b.