#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.176 1999/05/27 05:56:31 wessels Exp $
+# $Id: Makefile.in,v 1.177 1999/06/30 05:49:37 wessels Exp $
#
# Uncomment and customize the following to suit your needs:
#
UNLINKD_EXE = unlinkd$(exec_suffix)
PINGER_EXE = pinger$(exec_suffix)
CACHEMGR_EXE = cachemgr$(cgi_suffix)
+DISKD_EXE = diskd$(exec_suffix)
DEFAULT_PREFIX = $(prefix)
DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
$(SNMPLIB) $(MALLOCLIB) -lmiscutil $(XTRA_LIBS)
CLIENT_LIBS = -L../lib -lmiscutil $(XTRA_LIBS)
DNSSERVER_LIBS = -L../lib -lmiscutil $(XTRA_LIBS)
+DISKD_LIBS = -L../lib -lmiscutil $(XTRA_LIBS)
PINGER_LIBS = -L../lib -lmiscutil $(XTRA_LIBS)
STD_APP_LIBS = -L../lib -lmiscutil $(XTRA_LIBS)
store.o \
store_io.o \
store_io_ufs.o \
+ diskd.o \
store_client.o \
store_digest.o \
store_dir.o \
$(DNSSERVER_EXE): dnsserver.o
$(CC) -o $@ $(LDFLAGS) dnsserver.o $(DNSSERVER_LIBS)
+$(DISKD_EXE): diskd-daemon.o
+ $(CC) -o $@ $(LDFLAGS) diskd.o $(DISKD_LIBS)
+
+diskd-daemon.o: diskd.c
+ $(CC) -c $(CFLAGS) -DDISKD_DAEMON=1 $(srcdir)/diskd.c -o $@
+
$(CACHEMGR_EXE): cachemgr.o
$(CC) -o $@ $(LDFLAGS) cachemgr.o $(CLIENT_LIBS)
/*
- * $Id: cache_cf.cc,v 1.333 1999/06/24 20:19:56 wessels Exp $
+ * $Id: cache_cf.cc,v 1.334 1999/06/30 05:49:39 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
#if USE_ASYNC_IO
} else if (0 == strcasecmp(type_str, "asyncufs")) {
storeAufsDirParse(swap);
+#endif
+#if USE_DISKD
+ } else if (0 == strcasecmp(type_str, "diskd")) {
+ storeDiskdDirParse(swap);
#endif
} else {
fatalf("Unknown cache_dir type '%s'\n", type_str);
/*
- * $Id: comm_select.cc,v 1.35 1999/05/04 21:58:19 wessels Exp $
+ * $Id: comm_select.cc,v 1.36 1999/06/30 05:49:40 wessels Exp $
*
* DEBUG: section 5 Socket Functions
*
#if USE_ASYNC_IO
#define MAX_POLL_TIME 10
+#elif USE_DISKD
+#define MAX_POLL_TIME 10
#else
#define MAX_POLL_TIME 1000
#endif
#endif
#if USE_ASYNC_IO
aioCheckCallbacks();
+#endif
+#if USE_DISKD
+ storeDiskdReadQueue();
#endif
if (commCheckICPIncoming)
comm_poll_icp_incoming();
#endif
#if USE_ASYNC_IO
aioCheckCallbacks();
+#endif
+#if USE_DISKD
+ storeDiskdReadQueue();
#endif
if (commCheckICPIncoming)
comm_select_icp_incoming();
/*
- * $Id: enums.h,v 1.157 1999/06/18 04:24:59 wessels Exp $
+ * $Id: enums.h,v 1.158 1999/06/30 05:49:41 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
typedef enum {
SWAPDIR_UFS,
SWAPDIR_ASYNCUFS,
+#if USE_DISKD
+ SWAPDIR_DISKD,
+#endif
SWAPDIR_MAX
} swapdir_t;
/*
- * $Id: protos.h,v 1.340 1999/06/24 20:20:05 wessels Exp $
+ * $Id: protos.h,v 1.341 1999/06/30 05:49:42 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
extern void storeAufsUnlink(int fileno);
#endif
+#if USE_DISKD
+/*
+ * diskd.c
+ */
+extern storeIOState *storeDiskdOpen(sfileno, mode_t, STIOCB *, void *);
+extern void storeDiskdClose(storeIOState * sio);
+extern void storeDiskdRead(storeIOState *, char *, size_t, off_t, STRCB *, void *);
+extern void storeDiskdWrite(storeIOState *, char *, size_t, off_t, FREE *);
+extern void storeDiskdUnlink(int fileno);
+extern STINIT storeDiskdInit;
+extern void storeDiskdReadQueue(void);
+#endif
+
/*
* store_log.c
*/
extern void storeUfsDirDump(StoreEntry * entry, const char *name, SwapDir * s);
extern void storeUfsDirFree(SwapDir *);
extern char *storeUfsFullPath(sfileno fn, char *fullpath);
+extern STINIT storeUfsDirInit;
#if USE_ASYNC_IO
extern void storeAufsDirParse(cacheSwap * swap);
#endif
+#if USE_DISKD
+extern void storeDiskdDirParse(cacheSwap *);
+#endif
/*
/*
- * $Id: structs.h,v 1.301 1999/06/30 05:23:44 wessels Exp $
+ * $Id: structs.h,v 1.302 1999/06/30 05:49:44 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
int l2;
int swaplog_fd;
} ufs;
+#if USE_DISKD
+ struct {
+ int l1;
+ int l2;
+ int swaplog_fd;
+ int smsgid;
+ int rmsgid;
+ int wfd;
+ int send_no;
+ int recv_no;
+ int away;
+ } diskd;
+#endif
} u;
};
const char *read_buf;
link_list *pending_writes;
} aufs;
+#if USE_DISKD
+ struct {
+ int id;
+ struct {
+ unsigned int reading:1;
+ unsigned int writing:1;
+ } flags;
+ char *read_buf;
+ } diskd;
+#endif
} type;
};