Linux NFS development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	Jeff Layton <jlayton@kernel.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 4/4] NFS: use a hash table for delegation lookup
Date: Thu, 17 Jul 2025 07:13:15 +0200	[thread overview]
Message-ID: <20250717051315.GA27362@lst.de> (raw)
In-Reply-To: <202507171246.w67NRPWN-lkp@intel.com>

So nfs4 can be built modular, and delegation.o is built into that,
i.e. we can't call into deletation code from clone_server.

Back to passing a major number to nfs_alloc_server?

On Thu, Jul 17, 2025 at 12:35:07PM +0800, kernel test robot wrote:
> Hi Christoph,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on trondmy-nfs/linux-next]
> [also build test ERROR on linus/master v6.16-rc6 next-20250716]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Christoph-Hellwig/NFS-move-the-delegation_watermark-module-parameter/20250716-222708
> base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
> patch link:    https://lore.kernel.org/r/20250716132657.2167548-5-hch%40lst.de
> patch subject: [PATCH 4/4] NFS: use a hash table for delegation lookup
> config: i386-randconfig-013-20250717 (https://download.01.org/0day-ci/archive/20250717/202507171246.w67NRPWN-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250717/202507171246.w67NRPWN-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202507171246.w67NRPWN-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    ld: fs/nfs/client.o: in function `nfs_clone_server':
> >> fs/nfs/client.c:1162: undefined reference to `nfs4_delegation_hash_alloc'
> 
> 
> vim +1162 fs/nfs/client.c
> 
>   1135	
>   1136	/*
>   1137	 * Clone an NFS2, NFS3 or NFS4 server record
>   1138	 */
>   1139	struct nfs_server *nfs_clone_server(struct nfs_server *source,
>   1140					    struct nfs_fh *fh,
>   1141					    struct nfs_fattr *fattr,
>   1142					    rpc_authflavor_t flavor)
>   1143	{
>   1144		struct nfs_server *server;
>   1145		int error;
>   1146	
>   1147		server = nfs_alloc_server();
>   1148		if (!server)
>   1149			return ERR_PTR(-ENOMEM);
>   1150	
>   1151		server->cred = get_cred(source->cred);
>   1152	
>   1153		/* Copy data from the source */
>   1154		server->nfs_client = source->nfs_client;
>   1155		server->destroy = source->destroy;
>   1156		refcount_inc(&server->nfs_client->cl_count);
>   1157		nfs_server_copy_userdata(server, source);
>   1158	
>   1159		server->fsid = fattr->fsid;
>   1160	
>   1161		if (IS_ENABLED(CONFIG_NFS_V4) && server->delegation_hash_table) {
> > 1162			error = nfs4_delegation_hash_alloc(server);
>   1163			if (error)
>   1164				goto out_free_server;
>   1165		}
>   1166	
>   1167		nfs_sysfs_add_server(server);
>   1168	
>   1169		nfs_sysfs_link_rpc_client(server,
>   1170			server->nfs_client->cl_rpcclient, "_state");
>   1171	
>   1172		error = nfs_init_server_rpcclient(server,
>   1173				source->client->cl_timeout,
>   1174				flavor);
>   1175		if (error < 0)
>   1176			goto out_free_delegation_hash;
>   1177	
>   1178		/* probe the filesystem info for this server filesystem */
>   1179		error = nfs_probe_server(server, fh);
>   1180		if (error < 0)
>   1181			goto out_free_delegation_hash;
>   1182	
>   1183		if (server->namelen == 0 || server->namelen > NFS4_MAXNAMLEN)
>   1184			server->namelen = NFS4_MAXNAMLEN;
>   1185	
>   1186		error = nfs_start_lockd(server);
>   1187		if (error < 0)
>   1188			goto out_free_delegation_hash;
>   1189	
>   1190		nfs_server_insert_lists(server);
>   1191		server->mount_time = jiffies;
>   1192	
>   1193		return server;
>   1194	
>   1195	out_free_delegation_hash:
>   1196		kfree(server->delegation_hash_table);
>   1197	out_free_server:
>   1198		nfs_free_server(server);
>   1199		return ERR_PTR(error);
>   1200	}
>   1201	EXPORT_SYMBOL_GPL(nfs_clone_server);
>   1202	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
---end quoted text---

  reply	other threads:[~2025-07-17  5:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16 13:26 use a hash for looking up delegation v2 Christoph Hellwig
2025-07-16 13:26 ` [PATCH 1/4] NFS: cleanup nfs_inode_reclaim_delegation Christoph Hellwig
2025-07-16 13:26 ` [PATCH 2/4] NFS: move the delegation_watermark module parameter Christoph Hellwig
2025-07-16 13:26 ` [PATCH 3/4] NFS: track active delegations per-server Christoph Hellwig
2025-07-16 13:26 ` [PATCH 4/4] NFS: use a hash table for delegation lookup Christoph Hellwig
2025-07-17  4:35   ` kernel test robot
2025-07-17  5:13     ` Christoph Hellwig [this message]
2025-07-17 16:00       ` Trond Myklebust
  -- strict thread matches above, loose matches on Subject: below --
2025-07-14 11:16 use a hash for looking up delegation Christoph Hellwig
2025-07-14 11:16 ` [PATCH 4/4] NFS: use a hash table for delegation lookup Christoph Hellwig
2025-07-14 13:14   ` Jeff Layton
2025-07-14 13:18     ` Christoph Hellwig
2025-07-15  8:58     ` Christoph Hellwig
2025-07-15 11:19       ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250717051315.GA27362@lst.de \
    --to=hch@lst.de \
    --cc=anna@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox