mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Revert 195703 and 195821 as this special stop handling in NFS is now
implemented via VFCF_SBDRY rather than passing PBDRY to individual sleep calls.
This commit is contained in:
parent
b4cd804a96
commit
3b14c753ff
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248255
@ -981,13 +981,6 @@ struct nfsreq {
|
|||||||
#define NFSVNO_DELEGOK(v) (1)
|
#define NFSVNO_DELEGOK(v) (1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Define this as the flags argument for msleep() when catching signals
|
|
||||||
* while holding a resource that other threads would block for, such as
|
|
||||||
* a vnode lock.
|
|
||||||
*/
|
|
||||||
#define NFS_PCATCH (PCATCH | PBDRY)
|
|
||||||
|
|
||||||
#endif /* _KERNEL */
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
#endif /* _NFS_NFSPORT_H */
|
#endif /* _NFS_NFSPORT_H */
|
||||||
|
@ -1297,7 +1297,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, struct thread *td)
|
|||||||
sigset_t oldset;
|
sigset_t oldset;
|
||||||
|
|
||||||
newnfs_set_sigmask(td, &oldset);
|
newnfs_set_sigmask(td, &oldset);
|
||||||
bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0);
|
bp = getblk(vp, bn, size, PCATCH, 0, 0);
|
||||||
newnfs_restore_sigmask(td, &oldset);
|
newnfs_restore_sigmask(td, &oldset);
|
||||||
while (bp == NULL) {
|
while (bp == NULL) {
|
||||||
if (newnfs_sigintr(nmp, td))
|
if (newnfs_sigintr(nmp, td))
|
||||||
@ -1332,7 +1332,7 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg)
|
|||||||
if ((nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF))
|
if ((nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF))
|
||||||
intrflg = 1;
|
intrflg = 1;
|
||||||
if (intrflg) {
|
if (intrflg) {
|
||||||
slpflag = NFS_PCATCH;
|
slpflag = PCATCH;
|
||||||
slptimeo = 2 * hz;
|
slptimeo = 2 * hz;
|
||||||
} else {
|
} else {
|
||||||
slpflag = 0;
|
slpflag = 0;
|
||||||
@ -1413,7 +1413,7 @@ ncl_asyncio(struct nfsmount *nmp, struct buf *bp, struct ucred *cred, struct thr
|
|||||||
}
|
}
|
||||||
again:
|
again:
|
||||||
if (nmp->nm_flag & NFSMNT_INT)
|
if (nmp->nm_flag & NFSMNT_INT)
|
||||||
slpflag = NFS_PCATCH;
|
slpflag = PCATCH;
|
||||||
gotiod = FALSE;
|
gotiod = FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1478,7 +1478,7 @@ ncl_asyncio(struct nfsmount *nmp, struct buf *bp, struct ucred *cred, struct thr
|
|||||||
mtx_unlock(&ncl_iod_mutex);
|
mtx_unlock(&ncl_iod_mutex);
|
||||||
return (error2);
|
return (error2);
|
||||||
}
|
}
|
||||||
if (slpflag == NFS_PCATCH) {
|
if (slpflag == PCATCH) {
|
||||||
slpflag = 0;
|
slpflag = 0;
|
||||||
slptimeo = 2 * hz;
|
slptimeo = 2 * hz;
|
||||||
}
|
}
|
||||||
|
@ -2660,7 +2660,7 @@ ncl_flush(struct vnode *vp, int waitfor, struct ucred *cred, struct thread *td,
|
|||||||
if (called_from_renewthread != 0)
|
if (called_from_renewthread != 0)
|
||||||
slptimeo = hz;
|
slptimeo = hz;
|
||||||
if (nmp->nm_flag & NFSMNT_INT)
|
if (nmp->nm_flag & NFSMNT_INT)
|
||||||
slpflag = NFS_PCATCH;
|
slpflag = PCATCH;
|
||||||
if (!commit)
|
if (!commit)
|
||||||
passone = 0;
|
passone = 0;
|
||||||
bo = &vp->v_bufobj;
|
bo = &vp->v_bufobj;
|
||||||
@ -2866,7 +2866,7 @@ ncl_flush(struct vnode *vp, int waitfor, struct ucred *cred, struct thread *td,
|
|||||||
error = EINTR;
|
error = EINTR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (slpflag & PCATCH) {
|
if (slpflag == PCATCH) {
|
||||||
slpflag = 0;
|
slpflag = 0;
|
||||||
slptimeo = 2 * hz;
|
slptimeo = 2 * hz;
|
||||||
}
|
}
|
||||||
@ -2912,7 +2912,7 @@ ncl_flush(struct vnode *vp, int waitfor, struct ucred *cred, struct thread *td,
|
|||||||
error = newnfs_sigintr(nmp, td);
|
error = newnfs_sigintr(nmp, td);
|
||||||
if (error)
|
if (error)
|
||||||
goto done;
|
goto done;
|
||||||
if (slpflag & PCATCH) {
|
if (slpflag == PCATCH) {
|
||||||
slpflag = 0;
|
slpflag = 0;
|
||||||
slptimeo = 2 * hz;
|
slptimeo = 2 * hz;
|
||||||
}
|
}
|
||||||
|
@ -1242,7 +1242,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, struct thread *td)
|
|||||||
sigset_t oldset;
|
sigset_t oldset;
|
||||||
|
|
||||||
nfs_set_sigmask(td, &oldset);
|
nfs_set_sigmask(td, &oldset);
|
||||||
bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0);
|
bp = getblk(vp, bn, size, PCATCH, 0, 0);
|
||||||
nfs_restore_sigmask(td, &oldset);
|
nfs_restore_sigmask(td, &oldset);
|
||||||
while (bp == NULL) {
|
while (bp == NULL) {
|
||||||
if (nfs_sigintr(nmp, td))
|
if (nfs_sigintr(nmp, td))
|
||||||
@ -1275,7 +1275,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg)
|
|||||||
if ((nmp->nm_flag & NFSMNT_INT) == 0)
|
if ((nmp->nm_flag & NFSMNT_INT) == 0)
|
||||||
intrflg = 0;
|
intrflg = 0;
|
||||||
if (intrflg) {
|
if (intrflg) {
|
||||||
slpflag = NFS_PCATCH;
|
slpflag = PCATCH;
|
||||||
slptimeo = 2 * hz;
|
slptimeo = 2 * hz;
|
||||||
} else {
|
} else {
|
||||||
slpflag = 0;
|
slpflag = 0;
|
||||||
@ -1354,7 +1354,7 @@ nfs_asyncio(struct nfsmount *nmp, struct buf *bp, struct ucred *cred, struct thr
|
|||||||
}
|
}
|
||||||
again:
|
again:
|
||||||
if (nmp->nm_flag & NFSMNT_INT)
|
if (nmp->nm_flag & NFSMNT_INT)
|
||||||
slpflag = NFS_PCATCH;
|
slpflag = PCATCH;
|
||||||
gotiod = FALSE;
|
gotiod = FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1419,7 +1419,7 @@ nfs_asyncio(struct nfsmount *nmp, struct buf *bp, struct ucred *cred, struct thr
|
|||||||
mtx_unlock(&nfs_iod_mtx);
|
mtx_unlock(&nfs_iod_mtx);
|
||||||
return (error2);
|
return (error2);
|
||||||
}
|
}
|
||||||
if (slpflag == NFS_PCATCH) {
|
if (slpflag == PCATCH) {
|
||||||
slpflag = 0;
|
slpflag = 0;
|
||||||
slptimeo = 2 * hz;
|
slptimeo = 2 * hz;
|
||||||
}
|
}
|
||||||
|
@ -2992,7 +2992,7 @@ nfs_flush(struct vnode *vp, int waitfor, int commit)
|
|||||||
int bvecsize = 0, bveccount;
|
int bvecsize = 0, bveccount;
|
||||||
|
|
||||||
if (nmp->nm_flag & NFSMNT_INT)
|
if (nmp->nm_flag & NFSMNT_INT)
|
||||||
slpflag = NFS_PCATCH;
|
slpflag = PCATCH;
|
||||||
if (!commit)
|
if (!commit)
|
||||||
passone = 0;
|
passone = 0;
|
||||||
bo = &vp->v_bufobj;
|
bo = &vp->v_bufobj;
|
||||||
@ -3190,7 +3190,7 @@ nfs_flush(struct vnode *vp, int waitfor, int commit)
|
|||||||
error = EINTR;
|
error = EINTR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (slpflag & PCATCH) {
|
if (slpflag == PCATCH) {
|
||||||
slpflag = 0;
|
slpflag = 0;
|
||||||
slptimeo = 2 * hz;
|
slptimeo = 2 * hz;
|
||||||
}
|
}
|
||||||
@ -3228,7 +3228,7 @@ nfs_flush(struct vnode *vp, int waitfor, int commit)
|
|||||||
error = nfs_sigintr(nmp, td);
|
error = nfs_sigintr(nmp, td);
|
||||||
if (error)
|
if (error)
|
||||||
goto done;
|
goto done;
|
||||||
if (slpflag & PCATCH) {
|
if (slpflag == PCATCH) {
|
||||||
slpflag = 0;
|
slpflag = 0;
|
||||||
slptimeo = 2 * hz;
|
slptimeo = 2 * hz;
|
||||||
}
|
}
|
||||||
|
@ -125,8 +125,6 @@ struct nfsmount {
|
|||||||
#define NFS_DEFAULT_NEGNAMETIMEO 60
|
#define NFS_DEFAULT_NEGNAMETIMEO 60
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NFS_PCATCH (PCATCH | PBDRY)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -247,8 +247,7 @@ clnt_reconnect_call(
|
|||||||
stat = clnt_reconnect_connect(cl);
|
stat = clnt_reconnect_connect(cl);
|
||||||
if (stat == RPC_SYSTEMERROR) {
|
if (stat == RPC_SYSTEMERROR) {
|
||||||
error = tsleep(&fake_wchan,
|
error = tsleep(&fake_wchan,
|
||||||
rc->rc_intr ? PCATCH | PBDRY : 0, "rpccon",
|
rc->rc_intr ? PCATCH : 0, "rpccon", hz);
|
||||||
hz);
|
|
||||||
if (error == EINTR || error == ERESTART)
|
if (error == EINTR || error == ERESTART)
|
||||||
return (RPC_INTR);
|
return (RPC_INTR);
|
||||||
tries++;
|
tries++;
|
||||||
|
@ -162,7 +162,7 @@ clnt_vc_create(
|
|||||||
interrupted = 0;
|
interrupted = 0;
|
||||||
sleep_flag = PSOCK;
|
sleep_flag = PSOCK;
|
||||||
if (intrflag != 0)
|
if (intrflag != 0)
|
||||||
sleep_flag |= (PCATCH | PBDRY);
|
sleep_flag |= PCATCH;
|
||||||
while ((so->so_state & SS_ISCONNECTING)
|
while ((so->so_state & SS_ISCONNECTING)
|
||||||
&& so->so_error == 0) {
|
&& so->so_error == 0) {
|
||||||
error = msleep(&so->so_timeo, SOCK_MTX(so),
|
error = msleep(&so->so_timeo, SOCK_MTX(so),
|
||||||
@ -470,7 +470,6 @@ clnt_vc_call(
|
|||||||
errp->re_errno = error;
|
errp->re_errno = error;
|
||||||
switch (error) {
|
switch (error) {
|
||||||
case EINTR:
|
case EINTR:
|
||||||
case ERESTART:
|
|
||||||
stat = RPC_INTR;
|
stat = RPC_INTR;
|
||||||
break;
|
break;
|
||||||
case EWOULDBLOCK:
|
case EWOULDBLOCK:
|
||||||
@ -704,7 +703,7 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info)
|
|||||||
|
|
||||||
case CLSET_INTERRUPTIBLE:
|
case CLSET_INTERRUPTIBLE:
|
||||||
if (*(int *) info)
|
if (*(int *) info)
|
||||||
ct->ct_waitflag = PCATCH | PBDRY;
|
ct->ct_waitflag = PCATCH;
|
||||||
else
|
else
|
||||||
ct->ct_waitflag = 0;
|
ct->ct_waitflag = 0;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user