All of lore.kernel.org
 help / color / mirror / Atom feed
* Missing handling for NFS4ERR_OLD_STATEID in nfs4_handle_exception?
@ 2007-04-03 16:09 Frank Filz
  2007-04-12 11:59 ` Jeff Layton
  2007-04-12 18:07 ` Trond Myklebust
  0 siblings, 2 replies; 10+ messages in thread
From: Frank Filz @ 2007-04-03 16:09 UTC (permalink / raw)
  To: NFS List

I'm looking at the following code, and wondering if something is missing
in the handling of NFS4ERR_OLD_STATEID. The result is that if this error
occurs, nfs4_map_errors() will print:

	nfs4_map_errors could not handle NFSv4 error 10024

It also looks like the handling of NFS4ERR_DELAY etc. may be wrong,
since if nfs4_delay() returns without error, it falls through to the
handling of NFS4ERR_OLD_STATEID.

Based on the code in nfs4_async_handle_error(), it looks like it might
be sufficient to set ret = 0 in addition to exception->retry = 1.

Thanks for any thoughts

Frank Filz

/* This is the error handling routine for processes that are allowed
 * to sleep.
 */
int nfs4_handle_exception(const struct nfs_server *server, int
errorcode, struct nfs4_exception *exception)
{
	struct nfs_client *clp = server->nfs_client;
	int ret = errorcode;

	exception->retry = 0;
	switch(errorcode) {
		case 0:
			return 0;
		case -NFS4ERR_STALE_CLIENTID:
		case -NFS4ERR_STALE_STATEID:
		case -NFS4ERR_EXPIRED:
			nfs4_schedule_state_recovery(clp);
			ret = nfs4_wait_clnt_recover(server->client, clp);
			if (ret == 0)
				exception->retry = 1;
			break;
		case -NFS4ERR_FILE_OPEN:
		case -NFS4ERR_GRACE:
		case -NFS4ERR_DELAY:
			ret = nfs4_delay(server->client, &exception->timeout);
			if (ret != 0)
				break;
		case -NFS4ERR_OLD_STATEID:
			exception->retry = 1;
	}
	/* We failed to handle the error */
	return nfs4_map_errors(ret);
}



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-04-24 12:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-03 16:09 Missing handling for NFS4ERR_OLD_STATEID in nfs4_handle_exception? Frank Filz
2007-04-12 11:59 ` Jeff Layton
2007-04-12 17:11   ` Frank Filz
2007-04-12 17:51     ` Jeff Layton
2007-04-12 17:31   ` [NFS] " Trond Myklebust
2007-04-12 17:49     ` Jeff Layton
2007-04-12 18:07 ` Trond Myklebust
2007-04-18 13:57   ` Jeff Layton
2007-04-23 17:14     ` Frank Filz
2007-04-24 12:28       ` Jeff Layton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.