Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4857941ybf; Wed, 4 Mar 2020 12:06:37 -0800 (PST) X-Google-Smtp-Source: ADFU+vv+KmKq0/v/vBTBYZiQeBKEY/nWd8zBPJpRtRsQyu1h8Ez2LjoGG/71ROhkGMI4ukJFswMf X-Received: by 2002:aca:f496:: with SMTP id s144mr3045344oih.71.1583352397087; Wed, 04 Mar 2020 12:06:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583352397; cv=none; d=google.com; s=arc-20160816; b=oObbtyAlnEHJlwAbNm6Sg+c/83T3vgtOldXirVfx40F8WZT6mR4jHoEnhe54FtMMSh ISSzBf/KS8blneN7CHK9Dyhep+fddK1MV7sE8ETEdPHxhr6uUhNF0rLUOSHfk0wxjZgF iukzMrFe1kCJQxPBnWCGTIDNC/SbPLGhGEvHEd3tFUs7uufaeXu6WexioLJZN44HYAe5 3eN4a1n9tJL2UQJs28up4pUjYf4XKBEgeN+j94GlefQnh4aJUUUXrJkm17ocEcku/XeE qMf8xquRQI7epotHe9tQ52nzwZg2G3hFFGDLrfT1BaJIC2kDeBcKCb+IULcCB+DscaX8 ecYw== 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; bh=WlHJXKMSx1zntik4WsIpRurrAJ8EVLdJoCFKkYTr6w4=; b=KXS2MH7BawKPHA1u91zuMnN4EbSjXaxKhKozxCfvK9oGZOoC1/Ue9SzX5TfVHGXkSt i5Wk1x2FhzJB1/+44HesANqFyghw/DoHgxFmICT79yXKG/h2k624EoReL5PIRyOecCkv iu4aSunv2XrFOq+GaVuITi9LuCbCjUQca9Hoy34WxvS0M7NX8YnmTNOZ8yhR5Z8rIMw9 xq/kKKzRp+NbQDPafwgCnAHDqwDLs7UWiYM1WpIkvZ1mu7HVTJAScSKIyb/MoyLRZ+qA HB2VINyZEqs1NrLKg13YnHVOkoWVr6mLnO7zXallsZymvwScaZvtx0DaqAjYdrgO/AN8 hZPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si1995135otr.268.2020.03.04.12.06.12; Wed, 04 Mar 2020 12:06:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728599AbgCDUGK (ORCPT + 99 others); Wed, 4 Mar 2020 15:06:10 -0500 Received: from fieldses.org ([173.255.197.46]:39064 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbgCDUGK (ORCPT ); Wed, 4 Mar 2020 15:06:10 -0500 Received: by fieldses.org (Postfix, from userid 2815) id 283731C19; Wed, 4 Mar 2020 15:06:09 -0500 (EST) Date: Wed, 4 Mar 2020 15:06:09 -0500 From: Bruce Fields To: Chuck Lever Cc: YueHaibing , Olga Kornievskaia , Linux NFS Mailing List , linux-kernel@vger.kernel.org Subject: Re: [PATCH] nfsd: Fix build error Message-ID: <20200304200609.GA26924@fieldses.org> References: <20200304131803.46560-1-yuehaibing@huawei.com> 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 Wed, Mar 04, 2020 at 01:00:12PM -0500, Chuck Lever wrote: > Hi- > > > On Mar 4, 2020, at 8:18 AM, YueHaibing wrote: > > > > fs/nfsd/nfs4proc.o: In function `nfsd4_do_copy': > > nfs4proc.c:(.text+0x23b7): undefined reference to `nfs42_ssc_close' > > fs/nfsd/nfs4proc.o: In function `nfsd4_copy': > > nfs4proc.c:(.text+0x5d2a): undefined reference to `nfs_sb_deactive' > > fs/nfsd/nfs4proc.o: In function `nfsd4_do_async_copy': > > nfs4proc.c:(.text+0x61d5): undefined reference to `nfs42_ssc_open' > > nfs4proc.c:(.text+0x6389): undefined reference to `nfs_sb_deactive' > > > > Add dependency to NFSD_V4_2_INTER_SSC to fix this. > > > > Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy") > > Signed-off-by: YueHaibing > > --- > > fs/nfsd/Kconfig | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig > > index f368f32..fc587a5 100644 > > --- a/fs/nfsd/Kconfig > > +++ b/fs/nfsd/Kconfig > > @@ -136,6 +136,7 @@ config NFSD_FLEXFILELAYOUT > > > > config NFSD_V4_2_INTER_SSC > > bool "NFSv4.2 inter server to server COPY" > > + depends on !(NFSD=y && NFS_FS=m) > > The new dependency is not especially clear to me; more explanation > in the patch description about the cause of the build failure > would definitely be helpful. > > NFSD_V4 can't be set unless NFSD is also set. > > NFS_V4_2 can't be set unless NFS_V4_1 is also set, and that cannot > be set unless NFS_FS is also set. > > So what's really going on here? I don't understand that "depends" either. The fundamental problem, though, is that nfsd is calling nfs code directly. Which I noticed in earlier review and then forgot to follow up on, sorry. So either we: - let nfsd depend on nfs, fix up Kconfig to reflect the fact, or - write some code so nfsd can load nfs and find those symbols at runtime if it needs to do a copy. The latter's certainly doable, but it'd be simplest to do the former. Are there actually a lot of people who want nfsd but not nfs? Does that cause a real problem for anyone? --b.