Looping on ERR_OLD_STATEID on LOCK

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

 



Hi folks,

I'd like to understand why nfs4_do_handle_exception() for
ERR_OLD_STATEID just retries the operation. What happens is that the
client resends that same operation with the same stateid over to the
server and gets the same ERR_OLD_STATEID back which puts the client in
an infinite loop (and a hung state).

Shouldn't the client instead treat ERR_OLD_STATEID same as ERR_BAD_STATEID?

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index c8b554a..2e006bc 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -411,6 +411,7 @@ static int nfs4_do_handle_exception(struct
nfs_server *server,
  case -NFS4ERR_ADMIN_REVOKED:
  case -NFS4ERR_EXPIRED:
  case -NFS4ERR_BAD_STATEID:
+ case -NFS4ERR_OLD_STATEID:
  if (inode != NULL && stateid != NULL) {
  nfs_inode_find_state_and_recover(inode,
  stateid);
@@ -477,7 +478,6 @@ static int nfs4_do_handle_exception(struct
nfs_server *server,
  return 0;

  case -NFS4ERR_RETRY_UNCACHED_REP:
- case -NFS4ERR_OLD_STATEID:
  exception->retry = 1;
  break;
  case -NFS4ERR_BADOWNER:

Or alternative, for the LOCK it should be:
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index c8b554a..ce846faf 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6441,6 +6441,7 @@ static void nfs4_handle_setlk_error(struct
nfs_server *server, struct nfs4_lock_
  case -NFS4ERR_ADMIN_REVOKED:
  case -NFS4ERR_EXPIRED:
  case -NFS4ERR_BAD_STATEID:
+ case -NFS4ERR_OLD_STATEID:
  lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED;
  if (new_lock_owner != 0 ||
    test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags) != 0)
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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