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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 6C10DC3F2D1 for ; Thu, 5 Mar 2020 03:46:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E4D52073B for ; Thu, 5 Mar 2020 03:46:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725912AbgCEDqX (ORCPT ); Wed, 4 Mar 2020 22:46:23 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:35802 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725776AbgCEDqW (ORCPT ); Wed, 4 Mar 2020 22:46:22 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 794E7EBDBB5B7903EDA3; Thu, 5 Mar 2020 11:46:20 +0800 (CST) Received: from [127.0.0.1] (10.173.223.234) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Thu, 5 Mar 2020 11:46:18 +0800 Subject: Re: [PATCH] nfsd: Fix build error To: Bruce Fields , Chuck Lever References: <20200304131803.46560-1-yuehaibing@huawei.com> <20200304200609.GA26924@fieldses.org> CC: Olga Kornievskaia , Linux NFS Mailing List , From: Yuehaibing Message-ID: Date: Thu, 5 Mar 2020 11:46:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20200304200609.GA26924@fieldses.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.223.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/3/5 4:06, Bruce Fields wrote: > 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. Yes > > 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 It only fails while NFSD=y && NFS_FS=m, other cases works fine as Chuck Lever pointed. > - 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. > > . >