/*
- * $Id: comm.cc,v 1.383 2003/07/14 11:03:38 robertc Exp $
+ * $Id: comm.cc,v 1.384 2003/07/28 09:27:28 robertc Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
}
eventAdd("comm_accept_check_event", comm_accept_check_event, &fdc_table[fd],
- 1000.0 / (double)(fdc_table[fd].accept.accept.check_delay), 1);
+ 1000.0 / (double)(fdc_table[fd].accept.accept.check_delay), 1, false);
}
if (fdNFree() < RESERVED_FD) {
debug(5, 3) ("comm_accept_try: we're out of fds - deferring io!\n");
eventAdd("comm_accept_check_event", comm_accept_check_event, this,
- 1000.0 / (double)(accept.accept.check_delay), 1);
+ 1000.0 / (double)(accept.accept.check_delay), 1, false);
accept.accept.finished(true);
return;
}
void
AUFSFile::read(char *buf, off_t offset, size_t size)
{
+ debug(79, 3) ("AUFSFile::read: %p, size %u\n", this, size);
assert (fd > -1);
assert (ioRequestor.getRaw());
statCounter.syscalls.disk.reads++;
/*
- * $Id: store_io_ufs.cc,v 1.20 2003/07/22 15:23:15 robertc Exp $
+ * $Id: store_io_ufs.cc,v 1.21 2003/07/28 09:27:29 robertc Exp $
*
* DEBUG: section 79 Storage Manager UFS Interface
* AUTHOR: Duane Wessels
void
UFSFile::deleteSelf() const {delete this;}
-UFSFile::UFSFile (char const *aPath) : fd (-1), closed (true)
+UFSFile::UFSFile (char const *aPath) : fd (-1), closed (true), error_(false)
{
assert (aPath);
debug (79,3)("UFSFile::UFSFile: %s\n", aPath);
if (fd < 0) {
debug(79, 3) ("UFSFile::open: got failure (%d)\n", errno);
+ error(true);
} else {
closed = false;
store_open_disk_fd++;
bool
UFSFile::error() const
{
- if (fd < 0 && !closed)
+ if ((fd < 0 && !closed) || error_)
return true;
return false;
}
+void UFSFile::error(bool const &aBool)
+{
+ error_ = aBool;
+}
+
void
UFSStoreState::ioCompletedNotification()
{
CBDATA_CLASS(UFSFile);
int fd;
bool closed;
+ void error (bool const &);
+ bool error_;
char const *path_;
IORequestor::Pointer ioRequestor;
void doClose();
/*
- * $Id: protos.h,v 1.485 2003/07/22 15:23:02 robertc Exp $
+ * $Id: protos.h,v 1.486 2003/07/28 09:27:28 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
SQUIDCEXTERN void idnsPTRLookup(const struct in_addr, IDNSCB *, void *);
-SQUIDCEXTERN void eventAdd(const char *name, EVH * func, void *arg, double when, int, bool cbdata=true);
+extern void eventAdd(const char *name, EVH * func, void *arg, double when, int, bool cbdata=true);
SQUIDCEXTERN void eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int);
SQUIDCEXTERN void eventRun(void);
SQUIDCEXTERN int eventNextTime(void);
/*
- * $Id: store_client.cc,v 1.131 2003/07/14 14:16:02 robertc Exp $
+ * $Id: store_client.cc,v 1.132 2003/07/28 09:27:28 robertc Exp $
*
* DEBUG: section 90 Storage Manager Client-Side Interface
* AUTHOR: Duane Wessels
store_client::fail()
{
object_ok = false;
- callback(0, true);
+ /* synchronous open failures callback from the store,
+ * before startSwapin detects the failure.
+ * TODO: fix this inconsistent behaviour - probably by
+ * having storeSwapInStart become a callback functions,
+ * not synchronous
+ */
+
+ if (callbackPending())
+ callback(0, true);
}
static void