From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C748C43463 for ; Mon, 21 Sep 2020 06:48:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5AC072084C for ; Mon, 21 Sep 2020 06:48:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726488AbgIUGsR (ORCPT ); Mon, 21 Sep 2020 02:48:17 -0400 Received: from verein.lst.de ([213.95.11.211]:38665 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbgIUGsQ (ORCPT ); Mon, 21 Sep 2020 02:48:16 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 4772268AFE; Mon, 21 Sep 2020 08:48:14 +0200 (CEST) Date: Mon, 21 Sep 2020 08:48:13 +0200 From: Christoph Hellwig To: Trond Myklebust , Anna Schumaker , Al Viro Cc: Christoph Hellwig , Richard Henderson , Ivan Kokshaysky , Matt Turner , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH 2/5] fs,nfs: lift compat nfs4 mount data handling into the nfs code Message-ID: <20200921064813.GB18559@lst.de> References: <20200917082236.2518236-1-hch@lst.de> <20200917082236.2518236-3-hch@lst.de> <20200917171604.GW3421308@ZenIV.linux.org.uk> <20200917171826.GA8198@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200917171826.GA8198@lst.de> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2020 at 07:18:26PM +0200, Christoph Hellwig wrote: > On Thu, Sep 17, 2020 at 06:16:04PM +0100, Al Viro wrote: > > On Thu, Sep 17, 2020 at 10:22:33AM +0200, Christoph Hellwig wrote: > > > There is no reason the generic fs code should bother with NFS specific > > > binary mount data - lift the conversion into nfs4_parse_monolithic > > > instead. > > > > Considering the size of struct compat_nfs4_mount_data_v1... Do we really > > need to bother with that "copy in place, so we go through the fields > > backwards" logics? Just make that > > > > > +static void nfs4_compat_mount_data_conv(struct nfs4_mount_data *data) > > > +{ > > struct compat_nfs4_mount_data_v1 compat; > > compat = *(struct compat_nfs4_mount_data_v1 *)data; > > and copy the damnt thing without worrying about the field order... > > Maybe. But then again why bother? I just sticked to the existing > code as much as possible. Trond, Anna: what is your preference?