diff options
author | pjd <pjd@FreeBSD.org> | 2011-09-28 13:19:47 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-09-28 13:19:47 +0000 |
commit | 25b3d91c28b6f8cb7542a3071bd1a3179840ab3e (patch) | |
tree | ce22abe5e22a65f42946679c3d3db98ed7c87678 /sbin/hastd/primary.c | |
parent | 3fbe0df4ff86fa8830e20725cf422207c6873403 (diff) | |
download | FreeBSD-src-25b3d91c28b6f8cb7542a3071bd1a3179840ab3e.zip FreeBSD-src-25b3d91c28b6f8cb7542a3071bd1a3179840ab3e.tar.gz |
If the underlying provider doesn't support BIO_FLUSH, log it only once
and don't bother trying in the future.
MFC after: 3 days
Diffstat (limited to 'sbin/hastd/primary.c')
-rw-r--r-- | sbin/hastd/primary.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c index 08c3329..4a3c51f 100644 --- a/sbin/hastd/primary.c +++ b/sbin/hastd/primary.c @@ -1304,8 +1304,15 @@ local_send_thread(void *arg) } break; case BIO_FLUSH: + if (!res->hr_localflush) { + ret = -1; + errno = EOPNOTSUPP; + break; + } ret = g_flush(res->hr_localfd); if (ret < 0) { + if (errno == EOPNOTSUPP) + res->hr_localflush = false; hio->hio_errors[ncomp] = errno; reqlog(LOG_WARNING, 0, ggio, "Local request failed (%s): ", |