[nfs:testing 20/40] fs//nfs/nfs4proc.c:412:3: error: duplicate case value

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

 



tree:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git testing
head:   168d4f8633f3fc0fdd9f3f062dec089e387fed4e
commit: df1024df0c749ae3350f3dec4d6be8e2dc344e4c [20/40] NFSv4: Always clear the pNFS layout when handling ESTALE
config: parisc-712_defconfig (attached as .config)
compiler: hppa-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout df1024df0c749ae3350f3dec4d6be8e2dc344e4c
        # save the attached .config to linux build tree
        make.cross ARCH=parisc 

All errors (new ones prefixed by >>):

   fs//nfs/nfs4proc.c: In function 'nfs4_do_handle_exception':
>> fs//nfs/nfs4proc.c:412:3: error: duplicate case value
      case -ESTALE:
      ^~~~
   fs//nfs/nfs4proc.c:411:3: note: previously used here
      case -NFS4ERR_STALE:
      ^~~~

vim +412 fs//nfs/nfs4proc.c

   387	
   388	/* This is the error handling routine for processes that are allowed
   389	 * to sleep.
   390	 */
   391	static int nfs4_do_handle_exception(struct nfs_server *server,
   392			int errorcode, struct nfs4_exception *exception)
   393	{
   394		struct nfs_client *clp = server->nfs_client;
   395		struct nfs4_state *state = exception->state;
   396		const nfs4_stateid *stateid = exception->stateid;
   397		struct inode *inode = exception->inode;
   398		int ret = errorcode;
   399	
   400		exception->delay = 0;
   401		exception->recovering = 0;
   402		exception->retry = 0;
   403	
   404		if (stateid == NULL && state != NULL)
   405			stateid = &state->stateid;
   406	
   407		switch(errorcode) {
   408			case 0:
   409				return 0;
   410			case -NFS4ERR_BADHANDLE:
   411			case -NFS4ERR_STALE:
 > 412			case -ESTALE:
   413				if (inode != NULL && S_ISREG(inode->i_mode))
   414					pnfs_destroy_layout(NFS_I(inode));
   415				break;
   416			case -NFS4ERR_DELEG_REVOKED:
   417			case -NFS4ERR_ADMIN_REVOKED:
   418			case -NFS4ERR_EXPIRED:
   419			case -NFS4ERR_BAD_STATEID:
   420				if (inode != NULL && stateid != NULL) {
   421					nfs_inode_find_state_and_recover(inode,
   422							stateid);
   423					goto wait_on_recovery;
   424				}
   425			case -NFS4ERR_OPENMODE:
   426				if (inode) {
   427					int err;
   428	
   429					err = nfs_async_inode_return_delegation(inode,
   430							stateid);
   431					if (err == 0)
   432						goto wait_on_recovery;
   433					if (stateid != NULL && stateid->type == NFS4_DELEGATION_STATEID_TYPE) {
   434						exception->retry = 1;
   435						break;
   436					}
   437				}
   438				if (state == NULL)
   439					break;
   440				ret = nfs4_schedule_stateid_recovery(server, state);
   441				if (ret < 0)
   442					break;
   443				goto wait_on_recovery;
   444			case -NFS4ERR_STALE_STATEID:
   445			case -NFS4ERR_STALE_CLIENTID:
   446				nfs4_schedule_lease_recovery(clp);
   447				goto wait_on_recovery;
   448			case -NFS4ERR_MOVED:
   449				ret = nfs4_schedule_migration_recovery(server);
   450				if (ret < 0)
   451					break;
   452				goto wait_on_recovery;
   453			case -NFS4ERR_LEASE_MOVED:
   454				nfs4_schedule_lease_moved_recovery(clp);
   455				goto wait_on_recovery;
   456	#if defined(CONFIG_NFS_V4_1)
   457			case -NFS4ERR_BADSESSION:
   458			case -NFS4ERR_BADSLOT:
   459			case -NFS4ERR_BAD_HIGH_SLOT:
   460			case -NFS4ERR_CONN_NOT_BOUND_TO_SESSION:
   461			case -NFS4ERR_DEADSESSION:
   462			case -NFS4ERR_SEQ_FALSE_RETRY:
   463			case -NFS4ERR_SEQ_MISORDERED:
   464				dprintk("%s ERROR: %d Reset session\n", __func__,
   465					errorcode);
   466				nfs4_schedule_session_recovery(clp->cl_session, errorcode);
   467				goto wait_on_recovery;
   468	#endif /* defined(CONFIG_NFS_V4_1) */
   469			case -NFS4ERR_FILE_OPEN:
   470				if (exception->timeout > HZ) {
   471					/* We have retried a decent amount, time to
   472					 * fail
   473					 */
   474					ret = -EBUSY;
   475					break;
   476				}
   477			case -NFS4ERR_DELAY:
   478				nfs_inc_server_stats(server, NFSIOS_DELAY);
   479			case -NFS4ERR_GRACE:
   480			case -NFS4ERR_LAYOUTTRYLATER:
   481			case -NFS4ERR_RECALLCONFLICT:
   482				exception->delay = 1;
   483				return 0;
   484	
   485			case -NFS4ERR_RETRY_UNCACHED_REP:
   486			case -NFS4ERR_OLD_STATEID:
   487				exception->retry = 1;
   488				break;
   489			case -NFS4ERR_BADOWNER:
   490				/* The following works around a Linux server bug! */
   491			case -NFS4ERR_BADNAME:
   492				if (server->caps & NFS_CAP_UIDGID_NOMAP) {
   493					server->caps &= ~NFS_CAP_UIDGID_NOMAP;
   494					exception->retry = 1;
   495					printk(KERN_WARNING "NFS: v4 server %s "
   496							"does not accept raw "
   497							"uid/gids. "
   498							"Reenabling the idmapper.\n",
   499							server->nfs_client->cl_hostname);
   500				}
   501		}
   502		/* We failed to handle the error */
   503		return nfs4_map_errors(ret);
   504	wait_on_recovery:
   505		exception->recovering = 1;
   506		return 0;
   507	}
   508	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[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