diff options
author | mohans <mohans@FreeBSD.org> | 2007-09-25 21:08:49 +0000 |
---|---|---|
committer | mohans <mohans@FreeBSD.org> | 2007-09-25 21:08:49 +0000 |
commit | 422753af04dbb4b35f1007b2d48aa571f767f32f (patch) | |
tree | a5621c03f3af624f4e5d427d6fac2b59d127d713 /sys/nfsclient/nfs_bio.c | |
parent | 0d59ddbedf9205bb2600383d7600e7ea4c683ee3 (diff) | |
download | FreeBSD-src-422753af04dbb4b35f1007b2d48aa571f767f32f.zip FreeBSD-src-422753af04dbb4b35f1007b2d48aa571f767f32f.tar.gz |
Fix for a very rare race, caused by the nfsiod wakeup and nfsiod idle
timeout occurring at exactly the same time. If this happens, the nfsiod
exits although there may be a queued async IO request for it.
Found by : Kris Kennaway
Approved by: re
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index e1a7453..8066ac2 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -1453,6 +1453,13 @@ again: } } + /* We might have lost our nfsiod */ + if (nmp->nm_bufqiods == 0) { + NFS_DPF(ASYNCIO, + ("nfs_asyncio: no iods after mount %p queue was drained, looping\n", nmp)); + goto again; + } + if (bp->b_iocmd == BIO_READ) { if (bp->b_rcred == NOCRED && cred != NOCRED) bp->b_rcred = crhold(cred); |