Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1409507pxb; Fri, 27 Aug 2021 08:15:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTMnyrn+KLcF0KPgyN2gy2nsiyoPaYcKfUxQpq6peTHJCB/QCbXzUU3jrnyA80YI9F2fp7 X-Received: by 2002:a05:6638:e89:: with SMTP id p9mr5672905jas.95.1630077339002; Fri, 27 Aug 2021 08:15:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630077338; cv=none; d=google.com; s=arc-20160816; b=k5UQK4sQ6PwVj6S+xp4ZPOIPd8OL6hBYMfFl0hv/pKVel1S1Zd5yDDt7y+hqBxeEWe 6Wb5DkblIR0y5Kelupoc4+RS0BNGBx1nNBCpV4c3DdYEkiCIj5bdetRTHgS7lOOv3fp5 AaZqWGy0sy35NSUbAhk+qh3unFn8WVu+oY+85qT0vAmcYBc/gBEj0mIEdQHClZ/0moSG ew3qkp5NcPGlgX0PkA3YZ7kKRbchyxgTQKVbqHh+YuQeqmVTf5ObVnfrFT85lv/w2REl 5AMMkIhxDqdn6tzz9eRNDuBUrT9zrKsbJM5lgiOMOBH9VygCoystPJDyRRRReaGxQ/mV 9VyA== 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; bh=/T3EyTqvztuz2ii1M+FfJz3mfZDWH7KAYJmajVCytTg=; b=qt6UcQ9uKGnDOMGNVxXbg80MQ3JbrvmoIk8BrtYAC29IU0x82jw55+X+ahmfXJo5LM +9vxCv5rvLPb2PmlxPexCGKWRCaCT9g2CzzE6d3L2UMePx18xJddw58vdZjudNS5MlC6 W/cFk9xKZZPfBlCuSsXUNGtQ7LSFpMpjIWQ0Bvfyg5Ev8kqZ1xFw5pYXW02D1Zy2/QXf lpFCZ6N1j1H5JKn/z9Ox5eojZi8LMeQlXUxfE/aeo9gB8hd3RYBH/gTBQOvDnq9reFXD 7x1P+OL8jU/mXJ2Q9Z2pZTk1IuwyA04S8ywTaC/WPSTm0r0QdZW7ApEtWerl3XTLm3QX y6fA== ARC-Authentication-Results: i=1; mx.google.com; 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 x4si6168926ilj.121.2021.08.27.08.15.15; Fri, 27 Aug 2021 08:15:38 -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; 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 S233816AbhH0PQB (ORCPT + 99 others); Fri, 27 Aug 2021 11:16:01 -0400 Received: from verein.lst.de ([213.95.11.211]:34260 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233587AbhH0PQA (ORCPT ); Fri, 27 Aug 2021 11:16:00 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 4F80D67373; Fri, 27 Aug 2021 17:15:06 +0200 (CEST) Date: Fri, 27 Aug 2021 17:15:05 +0200 From: Christoph Hellwig To: NeilBrown Cc: "J. Bruce Fields" , Chuck Lever , Christoph Hellwig , linux-nfs@vger.kernel.org Subject: Re: [PATCH] NFSD: drop support for ancient file-handles Message-ID: <20210827151505.GA19199@lst.de> References: <162995209561.7591.4202079352301963089@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162995209561.7591.4202079352301963089@noble.neil.brown.name> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Aug 26, 2021 at 02:28:15PM +1000, NeilBrown wrote: > This patch also moves the nfsfh.h from the include/uapi directory into > fs/nfsd. I can find no evidence of it being used anywhere outside the > kernel. Certainly nfs-utils and wireshark do not use it. That sounds fine, but I'd split this into a separate patch. > fh_base and fh_pad are occasionally used to refer to the whole > filehandle. These are replaced with "fh_raw" which is hopefully more > meaningful. I think that kind of cleanup should also be a separate patch. That being said as far as I can tell fh_raw is only ever used in context where we can just pass a void pointer. So just giving the struct for the "new" file handle after fh_size a name and passing that would be much cleaner than a union with a char array. > I found > https://www.spinics.net/lists/linux-nfs/msg43280.html > "Re: [PATCH] nfsd: clean up fh_auth usage" > from 2014 where moving nfsfh.h out of uapi was considered but not > actioned. Christoph said he would "do some research if the > uapi headers are used anywhere at all". I can find no > report on the result of that research. My own research turned up > nothing. I can't remember doing much of research, and certainly not of finding anything. > - memcpy((char*)&fh.fh_handle.fh_base, f->data, f->size); > + memcpy((char*)&fh.fh_handle.fh_raw, f->data, f->size); Indedpendnt on what we're going to pass here, I don't think we should need cast like this one (there are a few more).