diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-08-10 19:07:33 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-08-27 14:21:21 -0400 |
commit | 3e77246393c0a433247631a1f0e9ec98d3d78a1c (patch) | |
tree | 34cc29296ecb2d5a74706c140fec51f03d4b578a | |
parent | 6577aac01f00636c16cd583c30bd4dedf18475d5 (diff) |
nfsd4: stop using nfserr_resource for transitory errors
The server is returning nfserr_resource for both permanent errors and
for errors (like allocation failures) that might be resolved by retrying
later. Save nfserr_resource for the former and use delay/jukebox for
the latter.
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | fs/nfsd/nfs4proc.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfs4recover.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index b5530984db91..50bae7471147 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -940,7 +940,7 @@ _nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
940 | count = 4 + (verify->ve_attrlen >> 2); | 940 | count = 4 + (verify->ve_attrlen >> 2); |
941 | buf = kmalloc(count << 2, GFP_KERNEL); | 941 | buf = kmalloc(count << 2, GFP_KERNEL); |
942 | if (!buf) | 942 | if (!buf) |
943 | return nfserr_resource; | 943 | return nfserr_jukebox; |
944 | 944 | ||
945 | status = nfsd4_encode_fattr(&cstate->current_fh, | 945 | status = nfsd4_encode_fattr(&cstate->current_fh, |
946 | cstate->current_fh.fh_export, | 946 | cstate->current_fh.fh_export, |
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 493851b844fe..ed083b9a731b 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -89,7 +89,7 @@ nfs4_make_rec_clidname(char *dname, struct xdr_netobj *clname) | |||
89 | struct xdr_netobj cksum; | 89 | struct xdr_netobj cksum; |
90 | struct hash_desc desc; | 90 | struct hash_desc desc; |
91 | struct scatterlist sg; | 91 | struct scatterlist sg; |
92 | __be32 status = nfserr_resource; | 92 | __be32 status = nfserr_jukebox; |
93 | 93 | ||
94 | dprintk("NFSD: nfs4_make_rec_clidname for %.*s\n", | 94 | dprintk("NFSD: nfs4_make_rec_clidname for %.*s\n", |
95 | clname->len, clname->data); | 95 | clname->len, clname->data); |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 36d0beb76864..c7d54f6a19c9 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1944,7 +1944,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
1944 | * of 5 bullet points, labeled as CASE0 - CASE4 below. | 1944 | * of 5 bullet points, labeled as CASE0 - CASE4 below. |
1945 | */ | 1945 | */ |
1946 | unconf = find_unconfirmed_client_by_str(dname, strhashval); | 1946 | unconf = find_unconfirmed_client_by_str(dname, strhashval); |
1947 | status = nfserr_resource; | 1947 | status = nfserr_jukebox; |
1948 | if (!conf) { | 1948 | if (!conf) { |
1949 | /* | 1949 | /* |
1950 | * RFC 3530 14.2.33 CASE 4: | 1950 | * RFC 3530 14.2.33 CASE 4: |
@@ -2481,7 +2481,7 @@ renew: | |||
2481 | if (open->op_stateowner == NULL) { | 2481 | if (open->op_stateowner == NULL) { |
2482 | sop = alloc_init_open_stateowner(strhashval, clp, open); | 2482 | sop = alloc_init_open_stateowner(strhashval, clp, open); |
2483 | if (sop == NULL) | 2483 | if (sop == NULL) |
2484 | return nfserr_resource; | 2484 | return nfserr_jukebox; |
2485 | open->op_stateowner = sop; | 2485 | open->op_stateowner = sop; |
2486 | } | 2486 | } |
2487 | list_del_init(&sop->so_close_lru); | 2487 | list_del_init(&sop->so_close_lru); |
@@ -2617,7 +2617,7 @@ nfs4_new_open(struct svc_rqst *rqstp, struct nfs4_stateid **stpp, | |||
2617 | 2617 | ||
2618 | stp = nfs4_alloc_stateid(); | 2618 | stp = nfs4_alloc_stateid(); |
2619 | if (stp == NULL) | 2619 | if (stp == NULL) |
2620 | return nfserr_resource; | 2620 | return nfserr_jukebox; |
2621 | 2621 | ||
2622 | status = nfs4_get_vfs_file(rqstp, fp, cur_fh, open); | 2622 | status = nfs4_get_vfs_file(rqstp, fp, cur_fh, open); |
2623 | if (status) { | 2623 | if (status) { |
@@ -2848,7 +2848,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf | |||
2848 | status = nfserr_bad_stateid; | 2848 | status = nfserr_bad_stateid; |
2849 | if (open->op_claim_type == NFS4_OPEN_CLAIM_DELEGATE_CUR) | 2849 | if (open->op_claim_type == NFS4_OPEN_CLAIM_DELEGATE_CUR) |
2850 | goto out; | 2850 | goto out; |
2851 | status = nfserr_resource; | 2851 | status = nfserr_jukebox; |
2852 | fp = alloc_init_file(ino); | 2852 | fp = alloc_init_file(ino); |
2853 | if (fp == NULL) | 2853 | if (fp == NULL) |
2854 | goto out; | 2854 | goto out; |
@@ -4033,7 +4033,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
4033 | /* XXX: Do we need to check for duplicate stateowners on | 4033 | /* XXX: Do we need to check for duplicate stateowners on |
4034 | * the same file, or should they just be allowed (and | 4034 | * the same file, or should they just be allowed (and |
4035 | * create new stateids)? */ | 4035 | * create new stateids)? */ |
4036 | status = nfserr_resource; | 4036 | status = nfserr_jukebox; |
4037 | lock_sop = alloc_init_lock_stateowner(strhashval, | 4037 | lock_sop = alloc_init_lock_stateowner(strhashval, |
4038 | open_sop->so_client, open_stp, lock); | 4038 | open_sop->so_client, open_stp, lock); |
4039 | if (lock_sop == NULL) | 4039 | if (lock_sop == NULL) |
@@ -4117,9 +4117,9 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
4117 | case (EDEADLK): | 4117 | case (EDEADLK): |
4118 | status = nfserr_deadlock; | 4118 | status = nfserr_deadlock; |
4119 | break; | 4119 | break; |
4120 | default: | 4120 | default: |
4121 | dprintk("NFSD: nfsd4_lock: vfs_lock_file() failed! status %d\n",err); | 4121 | dprintk("NFSD: nfsd4_lock: vfs_lock_file() failed! status %d\n",err); |
4122 | status = nfserr_resource; | 4122 | status = nfserrno(err); |
4123 | break; | 4123 | break; |
4124 | } | 4124 | } |
4125 | out: | 4125 | out: |