Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp676319ybk; Fri, 15 May 2020 10:36:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza7SyuU5QmsB6xZNiF5wvBgD67XxmkVPeSqsr7enwn4XnTp4OwUrFq8FU0x4wC9bJdZeDK X-Received: by 2002:aa7:de0e:: with SMTP id h14mr4151377edv.82.1589564204325; Fri, 15 May 2020 10:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589564204; cv=none; d=google.com; s=arc-20160816; b=SdKvGmisU0Y6uoe82TFC4TazR3meO+e6pQ0aT1EmQkVJqf9XMp/g0LVmbFK59LS3tB ivMQmnAgd2afwRHv/XSLi35FCn/iOpQxKQ+CQxHDHFkyopyX+n7sLdiu2yo5K5G73n3G ktMO+Bnw77EXVRz9fPmNE6dR2TmxIL1ye79F+7gRECqkTIJ9zlRN9+8sxs8NMErNA3vA ElYPXPx3V5QVz7Z115LPJ2UuAkzNEexuqhWzTQlMVsqbADTooTQEgaHox0I4gNmstJ7s CvbulnV4UtO3+zpZCYMYlwHLbLM8sVciLzKPlprEKHj66cakzUGb/o/p8IxOKsVIA+yu GgDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=KPB9Sq7v2TPIcM7TwZzzPQ/MWQa+9wV74BLtgx752QQ=; b=C+mM+1yeDQ8el06yDzIbSIA+4rZV6MXGOIpwn9Ee5lDUw0rrtvtwSW8ioYdoM1Eqdn MVgOodb+zu2uGMPbJVgoECYTLrEU4AohKrpO7N+rzAWfhac+7ptNtYU4sit4QQSQ4nZZ 4cLtcxwcchUsD/kWVXlnRxiXQrpXp3JkF+i4PLTXfaZ11MrMeKYASY9xneEAzjdMdgTM fwI2qwIMQ8LTTtVjSJSHwNCvzMNfb0EexN510lIVCvb94ibTEFKTt1jPftV5LGxNF7oZ q+lWRB6zL4F95La5sLJv6pE7SCtOLs/7WHi8aKx8UfYMeZcohC3jLwaSB4t7GUh945/r 7dlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="U/8Wfjg7"; 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 c9si1501833edt.576.2020.05.15.10.36.19; Fri, 15 May 2020 10:36:44 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="U/8Wfjg7"; 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 S1726231AbgEORgK (ORCPT + 99 others); Fri, 15 May 2020 13:36:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726183AbgEORgK (ORCPT ); Fri, 15 May 2020 13:36:10 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28D5FC061A0C; Fri, 15 May 2020 10:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:Sender:Reply-To:Cc:Content-ID:Content-Description; bh=KPB9Sq7v2TPIcM7TwZzzPQ/MWQa+9wV74BLtgx752QQ=; b=U/8Wfjg7133SCpQIG23VFFwrAZ twxYvuI7OiFfpjrFh9POhb8+hW0O0twkQdQa3wWY8PoGelF3Y8KremKd+FnWEhkp4tfLweqZygl8t 9Kj/SlpYGVg/9mUb4XUDA+qleSCXx8pf0k5tkT43mWMCStsFiOqWt5XCPGjj5UiFfmYBz9H0HJjNj tmt/oqSYw6oOH0wp46JZqHPaorOJF8IMCuvVtPyMVlxDlGF5asN6/RU41czRdIdVVtQBrLeZknHCa uQ19ijNuZOWlV4UvaDOcsGsUMQeAJyPpXVXVvz9OGL7O93uGEn4mB3cuxYBanRc0DBY75sMJbfq8c xI6f1kNg==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZeFg-00077f-VP; Fri, 15 May 2020 17:36:05 +0000 Subject: Re: [PATCH -next] nfs: fsinfo: fix build when CONFIG_NFS_V4 is not enabled To: Trond Myklebust , "linux-kernel@vger.kernel.org" , "linux-nfs@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "viro@ZenIV.linux.org.uk" , "dhowells@redhat.com" , "anna.schumaker@netapp.com" References: <7c446f9f404135f0f4109e03646c4ce598484cae.camel@hammerspace.com> From: Randy Dunlap Message-ID: <8e6ff78d-1c18-789b-a0ef-adf87a891a58@infradead.org> Date: Fri, 15 May 2020 10:36:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <7c446f9f404135f0f4109e03646c4ce598484cae.camel@hammerspace.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 5/15/20 10:33 AM, Trond Myklebust wrote: > On Fri, 2020-05-15 at 10:27 -0700, Randy Dunlap wrote: >> From: Randy Dunlap >> >> Fix multiple build errors when CONFIG_NFS_V4 is not enabled. >> >> ../fs/nfs/fsinfo.c: In function 'nfs_fsinfo_get_supports': >> ../fs/nfs/fsinfo.c:153:12: error: 'const struct nfs_server' has no >> member named 'attr_bitmask' >> if (server->attr_bitmask[0] & FATTR4_WORD0_SIZE) >> ^~ >> ../fs/nfs/fsinfo.c:155:12: error: 'const struct nfs_server' has no >> member named 'attr_bitmask' >> if (server->attr_bitmask[1] & FATTR4_WORD1_NUMLINKS) >> ^~ >> ../fs/nfs/fsinfo.c:158:12: error: 'const struct nfs_server' has no >> member named 'attr_bitmask' >> if (server->attr_bitmask[0] & FATTR4_WORD0_ARCHIVE) >> ^~ >> ../fs/nfs/fsinfo.c:160:12: error: 'const struct nfs_server' has no >> member named 'attr_bitmask' >> if (server->attr_bitmask[0] & FATTR4_WORD0_HIDDEN) >> ^~ >> ../fs/nfs/fsinfo.c:162:12: error: 'const struct nfs_server' has no >> member named 'attr_bitmask' >> if (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM) >> ^~ >> ../fs/nfs/fsinfo.c: In function 'nfs_fsinfo_get_features': >> ../fs/nfs/fsinfo.c:205:12: error: 'const struct nfs_server' has no >> member named 'attr_bitmask' >> if (server->attr_bitmask[0] & FATTR4_WORD0_CASE_INSENSITIVE) >> ^~ >> ../fs/nfs/fsinfo.c:207:13: error: 'const struct nfs_server' has no >> member named 'attr_bitmask' >> if ((server->attr_bitmask[0] & FATTR4_WORD0_ARCHIVE) || >> ^~ >> ../fs/nfs/fsinfo.c:208:13: error: 'const struct nfs_server' has no >> member named 'attr_bitmask' >> (server->attr_bitmask[0] & FATTR4_WORD0_HIDDEN) || >> ^~ >> ../fs/nfs/fsinfo.c:209:13: error: 'const struct nfs_server' has no >> member named 'attr_bitmask' >> (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM)) >> ^~ >> >> >> Signed-off-by: Randy Dunlap >> Cc: linux-nfs@vger.kernel.org >> Cc: Trond Myklebust >> Cc: Anna Schumaker >> Cc: Alexander Viro >> Cc: linux-fsdevel@vger.kernel.org >> Cc: David Howells >> --- >> fs/nfs/fsinfo.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> --- linux-next-20200515.orig/fs/nfs/fsinfo.c >> +++ linux-next-20200515/fs/nfs/fsinfo.c >> @@ -5,6 +5,7 @@ >> * Written by David Howells (dhowells@redhat.com) >> */ >> >> +#include >> #include >> #include >> #include "internal.h" >> @@ -150,6 +151,7 @@ static int nfs_fsinfo_get_supports(struc >> sup->stx_mask |= STATX_CTIME; >> if (server->caps & NFS_CAP_MTIME) >> sup->stx_mask |= STATX_MTIME; >> +#if IS_ENABLED(CONFIG_NFS_V4) >> if (server->attr_bitmask[0] & FATTR4_WORD0_SIZE) >> sup->stx_mask |= STATX_SIZE; >> if (server->attr_bitmask[1] & FATTR4_WORD1_NUMLINKS) >> @@ -161,6 +163,7 @@ static int nfs_fsinfo_get_supports(struc >> sup->win_file_attrs |= ATTR_HIDDEN; >> if (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM) >> sup->win_file_attrs |= ATTR_SYSTEM; >> +#endif >> >> sup->stx_attributes = STATX_ATTR_AUTOMOUNT; >> return sizeof(*sup); >> @@ -202,12 +205,14 @@ static int nfs_fsinfo_get_features(struc >> if (server->caps & NFS_CAP_MTIME) >> fsinfo_set_feature(ft, FSINFO_FEAT_HAS_MTIME); >> >> +#if IS_ENABLED(CONFIG_NFS_V4) >> if (server->attr_bitmask[0] & FATTR4_WORD0_CASE_INSENSITIVE) >> fsinfo_set_feature(ft, FSINFO_FEAT_NAME_CASE_INDEP); >> if ((server->attr_bitmask[0] & FATTR4_WORD0_ARCHIVE) || >> (server->attr_bitmask[0] & FATTR4_WORD0_HIDDEN) || >> (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM)) >> fsinfo_set_feature(ft, FSINFO_FEAT_WINDOWS_ATTRS); >> +#endif >> >> return sizeof(*ft); >> } > > This whole thing needs to be reviewed and acked by the NFS community, Certainly. > and quite frankly I'm inclined to NAK this. This is the second time > David tries to push this unwanted rewrite of totally unrelated code. No problem on that. I just want it to build cleanly. thanks. -- ~Randy