"ENOBUF" on socket writes isn't really fatal; we may just be too fast
for the driver. Don't log the error, just try again. Could try to be smart and do a backoff, but it's probably not worth the trouble.
This commit is contained in:
parent
8d38a9fc8e
commit
874d41c959
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_socket.c,v 1.59 2000/09/19 17:04:51 bjh21 Exp $ */
|
||||
/* $NetBSD: nfs_socket.c,v 1.60 2000/09/19 22:21:21 fvdl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993, 1995
|
||||
@ -441,15 +441,29 @@ nfs_send(so, nam, top, rep)
|
||||
(struct mbuf *)0, flags);
|
||||
if (error) {
|
||||
if (rep) {
|
||||
log(LOG_INFO, "nfs send error %d for server %s\n",error,
|
||||
rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);
|
||||
/*
|
||||
* Deal with errors for the client side.
|
||||
*/
|
||||
if (rep->r_flags & R_SOFTTERM)
|
||||
error = EINTR;
|
||||
else
|
||||
if (error == ENOBUFS && so->so_type == SOCK_DGRAM) {
|
||||
/*
|
||||
* We're too fast for the network/driver,
|
||||
* and UDP isn't flowcontrolled.
|
||||
* We need to resend. This is not fatal,
|
||||
* just try again.
|
||||
*
|
||||
* Could be smarter here by doing some sort
|
||||
* of a backoff, but this is rare.
|
||||
*/
|
||||
rep->r_flags |= R_MUSTRESEND;
|
||||
} else {
|
||||
log(LOG_INFO, "nfs send error %d for %s\n",
|
||||
error,
|
||||
rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);
|
||||
/*
|
||||
* Deal with errors for the client side.
|
||||
*/
|
||||
if (rep->r_flags & R_SOFTTERM)
|
||||
error = EINTR;
|
||||
else
|
||||
rep->r_flags |= R_MUSTRESEND;
|
||||
}
|
||||
} else
|
||||
log(LOG_INFO, "nfsd send error %d\n", error);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user