Re: [PATCH] NFS: Avoid flushing data while holding directory locks in nfs_rename()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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.15-rc3 next-20250424]
[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/trondmy-kernel-org/NFS-Avoid-flushing-data-while-holding-directory-locks-in-nfs_rename/20250428-070327
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
patch link:    https://lore.kernel.org/r/a804c54445a3f028007763e05285d765afcab0f9.1745794273.git.trond.myklebust%40hammerspace.com
patch subject: [PATCH] NFS: Avoid flushing data while holding directory locks in nfs_rename()
config: sparc-randconfig-002-20250428 (https://download.01.org/0day-ci/archive/20250428/202504281017.yCgdaZD3-lkp@xxxxxxxxx/config)
compiler: sparc-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250428/202504281017.yCgdaZD3-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504281017.yCgdaZD3-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   fs/nfs/client.c: In function 'nfs_create_server':
>> fs/nfs/client.c:1109:8: error: 'struct nfs_server' has no member named 'fh_expire_type'
     server->fh_expire_type = NFS_FH_VOL_RENAME;
           ^~
>> fs/nfs/client.c:1109:27: error: 'NFS_FH_VOL_RENAME' undeclared (first use in this function); did you mean 'NFS4_FH_VOL_RENAME'?
     server->fh_expire_type = NFS_FH_VOL_RENAME;
                              ^~~~~~~~~~~~~~~~~
                              NFS4_FH_VOL_RENAME
   fs/nfs/client.c:1109:27: note: each undeclared identifier is reported only once for each function it appears in
--
   fs/nfs/dir.c: In function 'nfs_rename_is_unsafe_cross_dir':
>> fs/nfs/dir.c:2686:12: error: 'struct nfs_server' has no member named 'fh_expire_type'
     if (server->fh_expire_type & NFS_FH_RENAME_UNSAFE)
               ^~
>> fs/nfs/dir.c:2686:31: error: 'NFS_FH_RENAME_UNSAFE' undeclared (first use in this function); did you mean 'TASK_FREEZABLE_UNSAFE'?
     if (server->fh_expire_type & NFS_FH_RENAME_UNSAFE)
                                  ^~~~~~~~~~~~~~~~~~~~
                                  TASK_FREEZABLE_UNSAFE
   fs/nfs/dir.c:2686:31: note: each undeclared identifier is reported only once for each function it appears in
   fs/nfs/dir.c:2687:18: error: 'struct nfs_server' has no member named 'fh_expire_type'
      return !(server->fh_expire_type & NFS_FH_NOEXPIRE_WITH_OPEN);
                     ^~
>> fs/nfs/dir.c:2687:37: error: 'NFS_FH_NOEXPIRE_WITH_OPEN' undeclared (first use in this function); did you mean 'NFS4_FH_NOEXPIRE_WITH_OPEN'?
      return !(server->fh_expire_type & NFS_FH_NOEXPIRE_WITH_OPEN);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
                                        NFS4_FH_NOEXPIRE_WITH_OPEN


vim +1109 fs/nfs/client.c

  1067	
  1068	/*
  1069	 * Create a version 2 or 3 volume record
  1070	 * - keyed on server and FSID
  1071	 */
  1072	struct nfs_server *nfs_create_server(struct fs_context *fc)
  1073	{
  1074		struct nfs_fs_context *ctx = nfs_fc2context(fc);
  1075		struct nfs_server *server;
  1076		struct nfs_fattr *fattr;
  1077		int error;
  1078	
  1079		server = nfs_alloc_server();
  1080		if (!server)
  1081			return ERR_PTR(-ENOMEM);
  1082	
  1083		server->cred = get_cred(fc->cred);
  1084	
  1085		error = -ENOMEM;
  1086		fattr = nfs_alloc_fattr();
  1087		if (fattr == NULL)
  1088			goto error;
  1089	
  1090		/* Get a client representation */
  1091		error = nfs_init_server(server, fc);
  1092		if (error < 0)
  1093			goto error;
  1094	
  1095		/* Probe the root fh to retrieve its FSID */
  1096		error = nfs_probe_fsinfo(server, ctx->mntfh, fattr);
  1097		if (error < 0)
  1098			goto error;
  1099		if (server->nfs_client->rpc_ops->version == 3) {
  1100			if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN)
  1101				server->namelen = NFS3_MAXNAMLEN;
  1102			if (!(ctx->flags & NFS_MOUNT_NORDIRPLUS))
  1103				server->caps |= NFS_CAP_READDIRPLUS;
  1104		} else {
  1105			if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
  1106				server->namelen = NFS2_MAXNAMLEN;
  1107		}
  1108		/* Linux 'subtree_check' borkenness mandates this setting */
> 1109		server->fh_expire_type = NFS_FH_VOL_RENAME;
  1110	
  1111		if (!(fattr->valid & NFS_ATTR_FATTR)) {
  1112			error = ctx->nfs_mod->rpc_ops->getattr(server, ctx->mntfh,
  1113							       fattr, NULL);
  1114			if (error < 0) {
  1115				dprintk("nfs_create_server: getattr error = %d\n", -error);
  1116				goto error;
  1117			}
  1118		}
  1119		memcpy(&server->fsid, &fattr->fsid, sizeof(server->fsid));
  1120	
  1121		dprintk("Server FSID: %llx:%llx\n",
  1122			(unsigned long long) server->fsid.major,
  1123			(unsigned long long) server->fsid.minor);
  1124	
  1125		nfs_server_insert_lists(server);
  1126		server->mount_time = jiffies;
  1127		nfs_free_fattr(fattr);
  1128		return server;
  1129	
  1130	error:
  1131		nfs_free_fattr(fattr);
  1132		nfs_free_server(server);
  1133		return ERR_PTR(error);
  1134	}
  1135	EXPORT_SYMBOL_GPL(nfs_create_server);
  1136	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux