aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2009-07-14 22:54:29 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2009-07-14 22:54:29 +0000
commitb35687df1384c17c4373863120d59daec2825a52 (patch)
treea0fd9946a1d3f491996b7e401f7dd0872d11817a
parentf33a947b56e0667c6e1e3384d00ffb1a5b67060e (diff)
Notes
-rw-r--r--sys/nfsclient/nfs_bio.c8
-rw-r--r--sys/nfsclient/nfs_vnops.c6
-rw-r--r--sys/nfsclient/nfsmount.h2
-rw-r--r--sys/rpc/clnt_rc.c3
-rw-r--r--sys/rpc/clnt_vc.c5
5 files changed, 14 insertions, 10 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index c803d683c401..945bc51597de 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -1254,7 +1254,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, struct thread *td)
sigset_t oldset;
nfs_set_sigmask(td, &oldset);
- bp = getblk(vp, bn, size, PCATCH, 0, 0);
+ bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0);
nfs_restore_sigmask(td, &oldset);
while (bp == NULL) {
if (nfs_sigintr(nmp, td))
@@ -1291,7 +1291,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg)
if ((nmp->nm_flag & NFSMNT_INT) == 0)
intrflg = 0;
if (intrflg) {
- slpflag = PCATCH;
+ slpflag = NFS_PCATCH;
slptimeo = 2 * hz;
} else {
slpflag = 0;
@@ -1370,7 +1370,7 @@ nfs_asyncio(struct nfsmount *nmp, struct buf *bp, struct ucred *cred, struct thr
}
again:
if (nmp->nm_flag & NFSMNT_INT)
- slpflag = PCATCH;
+ slpflag = NFS_PCATCH;
gotiod = FALSE;
/*
@@ -1439,7 +1439,7 @@ again:
mtx_unlock(&nfs_iod_mtx);
return (error2);
}
- if (slpflag == PCATCH) {
+ if (slpflag == NFS_PCATCH) {
slpflag = 0;
slptimeo = 2 * hz;
}
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index d6448369b205..692b38b8c969 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -2934,7 +2934,7 @@ nfs_flush(struct vnode *vp, int waitfor, int commit)
int bvecsize = 0, bveccount;
if (nmp->nm_flag & NFSMNT_INT)
- slpflag = PCATCH;
+ slpflag = NFS_PCATCH;
if (!commit)
passone = 0;
bo = &vp->v_bufobj;
@@ -3132,7 +3132,7 @@ loop:
error = EINTR;
goto done;
}
- if (slpflag == PCATCH) {
+ if (slpflag & PCATCH) {
slpflag = 0;
slptimeo = 2 * hz;
}
@@ -3170,7 +3170,7 @@ loop:
error = nfs_sigintr(nmp, td);
if (error)
goto done;
- if (slpflag == PCATCH) {
+ if (slpflag & PCATCH) {
slpflag = 0;
slptimeo = 2 * hz;
}
diff --git a/sys/nfsclient/nfsmount.h b/sys/nfsclient/nfsmount.h
index 99d12d9b4d4e..47d7ef305f6f 100644
--- a/sys/nfsclient/nfsmount.h
+++ b/sys/nfsclient/nfsmount.h
@@ -107,6 +107,8 @@ struct nfsmount {
#define NFS_TPRINTF_DELAY 30
#endif
+#define NFS_PCATCH (PCATCH | PBDRY)
+
#endif
#endif
diff --git a/sys/rpc/clnt_rc.c b/sys/rpc/clnt_rc.c
index 5e80d0581d37..217608c4bb36 100644
--- a/sys/rpc/clnt_rc.c
+++ b/sys/rpc/clnt_rc.c
@@ -264,7 +264,8 @@ clnt_reconnect_call(
stat = clnt_reconnect_connect(cl);
if (stat == RPC_SYSTEMERROR) {
error = tsleep(&fake_wchan,
- rc->rc_intr ? PCATCH : 0, "rpccon", hz);
+ rc->rc_intr ? PCATCH | PBDRY : 0, "rpccon",
+ hz);
if (error == EINTR || error == ERESTART)
return (RPC_INTR);
tries++;
diff --git a/sys/rpc/clnt_vc.c b/sys/rpc/clnt_vc.c
index 4e732f253b62..3f15c435c75f 100644
--- a/sys/rpc/clnt_vc.c
+++ b/sys/rpc/clnt_vc.c
@@ -196,7 +196,7 @@ clnt_vc_create(
while ((so->so_state & SS_ISCONNECTING)
&& so->so_error == 0) {
error = msleep(&so->so_timeo, SOCK_MTX(so),
- PSOCK | PCATCH, "connec", 0);
+ PSOCK | PCATCH | PBDRY, "connec", 0);
if (error) {
if (error == EINTR || error == ERESTART)
interrupted = 1;
@@ -477,6 +477,7 @@ call_again:
errp->re_errno = error;
switch (error) {
case EINTR:
+ case ERESTART:
stat = RPC_INTR;
break;
case EWOULDBLOCK:
@@ -709,7 +710,7 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info)
case CLSET_INTERRUPTIBLE:
if (*(int *) info)
- ct->ct_waitflag = PCATCH;
+ ct->ct_waitflag = PCATCH | PBDRY;
else
ct->ct_waitflag = 0;
break;