diff options
author | J.Bruce Fields <bfields@fieldses.org> | 2006-12-13 11:35:25 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 20:05:54 +0300 |
commit | e0bb89ef031f76dcb9c9d920d18b13948f1418da (patch) | |
tree | 6016032b160db2cf697eea19cd0f12ace946c7cc /fs/nfsd/export.c | |
parent | 021d3a72459191a76e8e482ee4937ba6bc9fd712 (diff) | |
download | linux-e0bb89ef031f76dcb9c9d920d18b13948f1418da.tar.xz |
[PATCH] knfsd: nfsd: don't drop silently on upcall deferral
To avoid tying up server threads when nfsd makes an upcall (to mountd, to get
export options, to idmapd, for nfsv4 name<->id mapping, etc.), we temporarily
"drop" the request and save enough information so that we can revisit it
later.
Certain failures during the deferral process can cause us to really drop the
request and never revisit it.
This is often less than ideal, and is unacceptable in the NFSv4 case--rfc 3530
forbids the server from dropping a request without also closing the
connection.
As a first step, we modify the deferral code to return -ETIMEDOUT (which is
translated to nfserr_jukebox in the v3 and v4 cases, and remains a drop in the
v2 case).
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r-- | fs/nfsd/export.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index b0591cd172eb..1137d09c5976 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -787,15 +787,20 @@ exp_get_by_name(svc_client *clp, struct vfsmount *mnt, struct dentry *dentry, key.ex_dentry = dentry; exp = svc_export_lookup(&key); - if (exp != NULL) - switch (cache_check(&svc_export_cache, &exp->h, reqp)) { + if (exp != NULL) { + int err; + + err = cache_check(&svc_export_cache, &exp->h, reqp); + switch (err) { case 0: break; case -EAGAIN: - exp = ERR_PTR(-EAGAIN); + case -ETIMEDOUT: + exp = ERR_PTR(err); break; default: exp = NULL; } + } return exp; } |