---------------------
PatchSet 321 
Date: 2002/12/11 21:45:22
Author: rbcollins
Branch: unify-io
Tag: (none) 
Log:
make write a virtual method

Members: 
	src/StoreIOState.h:1.1.2.6->1.1.2.7 
	src/SwapDir.h:1.1.2.6->1.1.2.7 
	src/store_io.cc:1.3.10.5->1.3.10.6 
	src/ufscommon.h:1.1.20.20->1.1.20.21 
	src/fs/aufs/store_asyncufs.h:1.2.12.23->1.2.12.24 
	src/fs/aufs/store_dir_aufs.cc:1.2.12.7->1.2.12.8 
	src/fs/aufs/store_io_aufs.cc:1.3.12.24->1.3.12.25 
	src/fs/coss/store_coss.h:1.3.10.8->1.3.10.9 
	src/fs/coss/store_dir_coss.cc:1.4.10.5->1.4.10.6 
	src/fs/coss/store_io_coss.cc:1.3.10.8->1.3.10.9 
	src/fs/diskd/store_dir_diskd.cc:1.2.16.15->1.2.16.16 
	src/fs/diskd/store_diskd.h:1.1.20.25->1.1.20.26 
	src/fs/diskd/store_io_diskd.cc:1.1.20.32->1.1.20.33 
	src/fs/ufs/store_dir_ufs.cc:1.1.20.6->1.1.20.7 
	src/fs/ufs/store_io_ufs.cc:1.3.10.29->1.3.10.30 
	src/fs/ufs/store_ufs.h:1.1.20.19->1.1.20.20 

Index: squid3/src/StoreIOState.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/StoreIOState.h,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- squid3/src/StoreIOState.h	11 Dec 2002 11:44:18 -0000	1.1.2.6
+++ squid3/src/StoreIOState.h	11 Dec 2002 21:45:22 -0000	1.1.2.7
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreIOState.h,v 1.1.2.6 2002/12/11 11:44:18 rbcollins Exp $
+ * $Id: StoreIOState.h,v 1.1.2.7 2002/12/11 21:45:22 rbcollins Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -49,6 +49,7 @@
     off_t offset() const;
 
     virtual void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data) = 0;
+    virtual void write(char *buf, size_t size, off_t offset, FREE * free_func) = 0;
     
     sdirno swap_dirn;
     sfileno swap_filen;
Index: squid3/src/SwapDir.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/SwapDir.h,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- squid3/src/SwapDir.h	11 Dec 2002 11:15:20 -0000	1.1.2.6
+++ squid3/src/SwapDir.h	11 Dec 2002 21:45:22 -0000	1.1.2.7
@@ -1,6 +1,6 @@
 
 /*
- * $Id: SwapDir.h,v 1.1.2.6 2002/12/11 11:15:20 rbcollins Exp $
+ * $Id: SwapDir.h,v 1.1.2.7 2002/12/11 21:45:22 rbcollins Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -53,7 +53,6 @@
 typedef StoreIOState::Pointer STOBJCREATE(SwapDir *, StoreEntry *, STFNCB *, STIOCB *, void *);
 typedef StoreIOState::Pointer STOBJOPEN(SwapDir *, StoreEntry *, STFNCB *, STIOCB *, void *);
 typedef void STOBJCLOSE(SwapDir *, storeIOState *);
-typedef void STOBJWRITE(SwapDir *, storeIOState *, char *, size_t, off_t, FREE *);
 typedef void STOBJUNLINK(SwapDir *, StoreEntry *);
 class IOStrategy;
 
@@ -96,7 +95,6 @@
 	STOBJCREATE *create;
 	STOBJOPEN *open;
 	STOBJCLOSE *close;
-	STOBJWRITE *write;
 	STOBJUNLINK *unlink;
     } obj;
     struct {
Index: squid3/src/store_io.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/store_io.cc,v
retrieving revision 1.3.10.5
retrieving revision 1.3.10.6
diff -u -r1.3.10.5 -r1.3.10.6
--- squid3/src/store_io.cc	11 Dec 2002 11:44:18 -0000	1.3.10.5
+++ squid3/src/store_io.cc	11 Dec 2002 21:45:22 -0000	1.3.10.6
@@ -85,8 +85,7 @@
 void
 storeWrite(StoreIOState::Pointer sio, char *buf, size_t size, off_t offset, FREE * free_func)
 {
-    SwapDir *SD = INDEXSD(sio->swap_dirn);
-    SD->obj.write(SD, sio.getRaw(), buf, size, offset, free_func);
+    sio->write(buf,size,offset,free_func);
 }
 
 void
Index: squid3/src/ufscommon.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/Attic/ufscommon.h,v
retrieving revision 1.1.20.20
retrieving revision 1.1.20.21
diff -u -r1.1.20.20 -r1.1.20.21
--- squid3/src/ufscommon.h	11 Dec 2002 11:44:18 -0000	1.1.20.20
+++ squid3/src/ufscommon.h	11 Dec 2002 21:45:22 -0000	1.1.20.21
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ufscommon.h,v 1.1.20.20 2002/12/11 11:44:18 rbcollins Exp $
+ * $Id: ufscommon.h,v 1.1.20.21 2002/12/11 21:45:22 rbcollins Exp $
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  * ----------------------------------------------------------
@@ -136,6 +136,7 @@
     bool reading;
     bool writing;
     void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data) = 0;
+    void write(char *buf, size_t size, off_t offset, FREE * free_func) = 0;
   protected:
     class _queued_read {
       public:
Index: squid3/src/fs/aufs/store_asyncufs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/aufs/Attic/store_asyncufs.h,v
retrieving revision 1.2.12.23
retrieving revision 1.2.12.24
diff -u -r1.2.12.23 -r1.2.12.24
--- squid3/src/fs/aufs/store_asyncufs.h	11 Dec 2002 11:44:18 -0000	1.2.12.23
+++ squid3/src/fs/aufs/store_asyncufs.h	11 Dec 2002 21:45:22 -0000	1.2.12.24
@@ -131,6 +131,7 @@
 	unsigned int inreaddone:1;
     } flags;
     void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data);
+    virtual void write(char *buf, size_t size, off_t offset, FREE * free_func);
     char *read_buf;
     link_list *pending_writes;
     void ioCompletedNotification();
@@ -156,7 +157,6 @@
  */
 #include "SwapDir.h"
 extern STOBJCLOSE storeAufsClose;
-extern STOBJWRITE storeAufsWrite;
 extern STOBJUNLINK storeAufsUnlink;
 
 #include "IOStrategy.h"
Index: squid3/src/fs/aufs/store_dir_aufs.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/aufs/Attic/store_dir_aufs.cc,v
retrieving revision 1.2.12.7
retrieving revision 1.2.12.8
diff -u -r1.2.12.7 -r1.2.12.8
--- squid3/src/fs/aufs/store_dir_aufs.cc	11 Dec 2002 11:15:20 -0000	1.2.12.7
+++ squid3/src/fs/aufs/store_dir_aufs.cc	11 Dec 2002 21:45:23 -0000	1.2.12.8
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_aufs.cc,v 1.2.12.7 2002/12/11 11:15:20 rbcollins Exp $
+ * $Id: store_dir_aufs.cc,v 1.2.12.8 2002/12/11 21:45:23 rbcollins Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -205,7 +205,6 @@
     sd->obj.create = commonUFSCreate;
     sd->obj.open = commonUFSOpen;
     sd->obj.close = storeAufsClose;
-    sd->obj.write = storeAufsWrite;
     sd->obj.unlink = storeAufsUnlink;
     sd->log.open = commonUfsDirOpenSwapLog;
     sd->log.close = commonUfsDirCloseSwapLog;
Index: squid3/src/fs/aufs/store_io_aufs.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/aufs/Attic/store_io_aufs.cc,v
retrieving revision 1.3.12.24
retrieving revision 1.3.12.25
diff -u -r1.3.12.24 -r1.3.12.25
--- squid3/src/fs/aufs/store_io_aufs.cc	11 Dec 2002 11:44:18 -0000	1.3.12.24
+++ squid3/src/fs/aufs/store_io_aufs.cc	11 Dec 2002 21:45:23 -0000	1.3.12.25
@@ -288,25 +288,24 @@
 
 /* Write */
 void
-storeAufsWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t offset, FREE * free_func)
+squidaiostate_t::write(char *buf, size_t size, off_t offset, FREE * free_func)
 {
-    squidaiostate_t *aiostate = dynamic_cast<squidaiostate_t *>(sio);
     debug(79, 3) ("storeAufsWrite: dirno %d, fileno %08X, FD %d\n",
-	sio->swap_dirn, sio->swap_filen, aiostate->fd);
-    if (aiostate->fd < 0) {
+	swap_dirn, swap_filen, fd);
+    if (fd < 0) {
 	/* disk file not opened yet */
 	struct _queued_write *q;
-	assert(aiostate->creating);
+	assert(creating);
 	q = (struct _queued_write *)memPoolAlloc(aufs_qwrite_pool);
 	q->buf = buf;
 	q->size = size;
 	q->offset = offset;
 	q->free_func = free_func;
-	linklistPush(&(aiostate->pending_writes), q);
+	linklistPush(&pending_writes, q);
 	return;
     }
 #if ASYNC_WRITE
-    if (aiostate->writing) {
+    if (writing) {
 	struct _queued_write *q;
 	debug(79, 3) ("storeAufsWrite: queuing write\n");
 	q = (struct _queued_write *)memPoolAlloc(aufs_qwrite_pool);
@@ -314,14 +313,14 @@
 	q->size = size;
 	q->offset = offset;
 	q->free_func = free_func;
-	linklistPush(&(aiostate->pending_writes), q);
+	linklistPush(&(pending_writes), q);
 	return;
     }
-    aiostate->writing = true;
-    aioWrite(aiostate->fd, offset, buf, size, storeAufsWriteDone, sio,
+    writing = true;
+    aioWrite(fd, offset, buf, size, storeAufsWriteDone, this,
 	free_func);
 #else
-    file_write(aiostate->fd, offset, buf, size, storeAufsWriteDone, sio,
+    file_write(fd, offset, buf, size, storeAufsWriteDone, this,
 	free_func);
 #endif
 }
@@ -347,7 +346,7 @@
 	return 0;
     debug(79, 3) ("storeAufsKickWriteQueue: writing queued chunk of %ld bytes\n",
 	(long int) q->size);
-    storeAufsWrite(INDEXSD(sio->swap_dirn), sio, q->buf, q->size, q->offset, q->free_func);
+    sio->write(q->buf, q->size, q->offset, q->free_func);
     memPoolFree(aufs_qwrite_pool, q);
     return 1;
 }
Index: squid3/src/fs/coss/store_coss.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/coss/store_coss.h,v
retrieving revision 1.3.10.8
retrieving revision 1.3.10.9
diff -u -r1.3.10.8 -r1.3.10.9
--- squid3/src/fs/coss/store_coss.h	11 Dec 2002 11:44:18 -0000	1.3.10.8
+++ squid3/src/fs/coss/store_coss.h	11 Dec 2002 21:45:23 -0000	1.3.10.9
@@ -78,6 +78,7 @@
     } flags;
     size_t st_size;
     void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data);
+    void write(char *buf, size_t size, off_t offset, FREE * free_func);
 private:
     static MemPool *Pool;
 };
@@ -98,7 +99,6 @@
 extern STOBJCREATE storeCossCreate;
 extern STOBJOPEN storeCossOpen;
 extern STOBJCLOSE storeCossClose;
-extern STOBJWRITE storeCossWrite;
 extern STOBJUNLINK storeCossUnlink;
 extern STSYNC storeCossSync;
 
Index: squid3/src/fs/coss/store_dir_coss.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/coss/store_dir_coss.cc,v
retrieving revision 1.4.10.5
retrieving revision 1.4.10.6
diff -u -r1.4.10.5 -r1.4.10.6
--- squid3/src/fs/coss/store_dir_coss.cc	11 Dec 2002 11:15:20 -0000	1.4.10.5
+++ squid3/src/fs/coss/store_dir_coss.cc	11 Dec 2002 21:45:23 -0000	1.4.10.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_coss.cc,v 1.4.10.5 2002/12/11 11:15:20 rbcollins Exp $
+ * $Id: store_dir_coss.cc,v 1.4.10.6 2002/12/11 21:45:23 rbcollins Exp $
  *
  * DEBUG: section 47    Store COSS Directory Routines
  * AUTHOR: Eric Stern
@@ -779,7 +779,6 @@
     sd->obj.create = storeCossCreate;
     sd->obj.open = storeCossOpen;
     sd->obj.close = storeCossClose;
-    sd->obj.write = storeCossWrite;
     sd->obj.unlink = storeCossUnlink;
 
     sd->log.open = storeCossDirOpenSwapLog;
Index: squid3/src/fs/coss/store_io_coss.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/coss/store_io_coss.cc,v
retrieving revision 1.3.10.8
retrieving revision 1.3.10.9
diff -u -r1.3.10.8 -r1.3.10.9
--- squid3/src/fs/coss/store_io_coss.cc	11 Dec 2002 11:44:18 -0000	1.3.10.8
+++ squid3/src/fs/coss/store_io_coss.cc	11 Dec 2002 21:45:23 -0000	1.3.10.9
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_coss.cc,v 1.3.10.8 2002/12/11 11:44:18 rbcollins Exp $
+ * $Id: store_io_coss.cc,v 1.3.10.9 2002/12/11 21:45:23 rbcollins Exp $
  *
  * DEBUG: section 79    Storage Manager COSS Interface
  * AUTHOR: Eric Stern
@@ -341,7 +341,7 @@
 }
 
 void
-storeCossWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t offset, FREE * free_func)
+CossState::write(char *buf, size_t size, off_t offset, FREE * free_func)
 {
     char *dest;
     CossMemBuf *membuf;
@@ -351,14 +351,15 @@
      * If we get handed an object with a size of -1,
      * the squid code is broken
      */
-    assert(sio->e->mem_obj->object_sz != -1);
+    assert(e->mem_obj->object_sz != -1);
 
-    debug(79, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int) sio->offset_, (unsigned long int) size);
-    diskoffset = sio->swap_filen + sio->offset_;
+    debug(79, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int) offset_, (unsigned long int) size);
+    diskoffset = swap_filen + offset_;
+    SwapDir *SD = INDEXSD(swap_dirn);
     dest = storeCossMemPointerFromDiskOffset(SD, diskoffset, &membuf);
     assert(dest != NULL);
     xmemcpy(dest, buf, size);
-    sio->offset_ += size;
+    offset_ += size;
     if (free_func)
 	(free_func) (buf);
 }
Index: squid3/src/fs/diskd/store_dir_diskd.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/diskd/Attic/store_dir_diskd.cc,v
retrieving revision 1.2.16.15
retrieving revision 1.2.16.16
diff -u -r1.2.16.15 -r1.2.16.16
--- squid3/src/fs/diskd/store_dir_diskd.cc	11 Dec 2002 11:15:20 -0000	1.2.16.15
+++ squid3/src/fs/diskd/store_dir_diskd.cc	11 Dec 2002 21:45:23 -0000	1.2.16.16
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_diskd.cc,v 1.2.16.15 2002/12/11 11:15:20 rbcollins Exp $
+ * $Id: store_dir_diskd.cc,v 1.2.16.16 2002/12/11 21:45:23 rbcollins Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -413,7 +413,6 @@
     sd->obj.create = commonUFSCreate;
     sd->obj.open = commonUFSOpen;
     sd->obj.close = storeDiskdClose;
-    sd->obj.write = storeDiskdWrite;
     sd->obj.unlink = storeDiskdUnlink;
     sd->log.open = commonUfsDirOpenSwapLog;
     sd->log.close = commonUfsDirCloseSwapLog;
Index: squid3/src/fs/diskd/store_diskd.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/diskd/Attic/store_diskd.h,v
retrieving revision 1.1.20.25
retrieving revision 1.1.20.26
diff -u -r1.1.20.25 -r1.1.20.26
--- squid3/src/fs/diskd/store_diskd.h	11 Dec 2002 11:44:18 -0000	1.1.20.25
+++ squid3/src/fs/diskd/store_diskd.h	11 Dec 2002 21:45:23 -0000	1.1.20.26
@@ -73,6 +73,7 @@
     void ioCompletedNotification();
     void closeCompleted();
     void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data);
+    void write(char *buf, size_t size, off_t offset, FREE * free_func);
   private:
     CBDATA_CLASS(diskdstate_t);
 };
@@ -131,7 +132,6 @@
 extern STOBJCREATE storeDiskdCreate;
 extern STOBJOPEN storeDiskdOpen;
 extern STOBJCLOSE storeDiskdClose;
-extern STOBJWRITE storeDiskdWrite;
 extern STOBJUNLINK storeDiskdUnlink;
 
 #define SHMBUF_BLKSZ SM_PAGE_SIZE
Index: squid3/src/fs/diskd/store_io_diskd.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/diskd/Attic/store_io_diskd.cc,v
retrieving revision 1.1.20.32
retrieving revision 1.1.20.33
diff -u -r1.1.20.32 -r1.1.20.33
--- squid3/src/fs/diskd/store_io_diskd.cc	11 Dec 2002 11:44:18 -0000	1.1.20.32
+++ squid3/src/fs/diskd/store_io_diskd.cc	11 Dec 2002 21:45:23 -0000	1.1.20.33
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_diskd.cc,v 1.1.20.32 2002/12/11 11:44:18 rbcollins Exp $
+ * $Id: store_io_diskd.cc,v 1.1.20.33 2002/12/11 21:45:23 rbcollins Exp $
  *
  * DEBUG: section 79    Squid-side DISKD I/O functions.
  * AUTHOR: Duane Wessels
@@ -492,30 +492,30 @@
 }
 
 void
-storeDiskdWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t offset, FREE * free_func)
+diskdstate_t::write(char *buf, size_t size, off_t offset, FREE * free_func)
 {
+    SwapDir *SD = INDEXSD(swap_dirn);
     int x;
     char *sbuf;
     off_t shm_offset;
-    diskdstate_t *diskdstate = dynamic_cast<diskdstate_t *>(sio);;
-    debug(79, 3) ("storeDiskdWrite: dirno %d, fileno %08X\n", SD->index, sio->swap_filen);
-    assert(!diskdstate->closing);
-    diskdstate->writing = true;
+    debug(79, 3) ("storeDiskdWrite: dirno %d, fileno %08X\n", swap_dirn, swap_filen);
+    assert(!closing);
+    writing = true;
     sbuf = (char *)((DiskdIO *)SD->IO)->shm.get(&shm_offset);
     xmemcpy(sbuf, buf, size);
     if (free_func)
 	free_func(buf);
     x = storeDiskdSend(_MQD_WRITE,
 	(DiskdIO *)SD->IO,
-((DiskdFile *)diskdstate->theFile.getRaw())->getID(),
-	sio,
+((DiskdFile *)theFile.getRaw())->getID(),
+	this,
 	(int) size,
 	(int) offset,
 	shm_offset);
     if (x < 0) {
 	debug(79, 1) ("storeDiskdSend WRITE: %s\n", xstrerror());
 	((DiskdIO *)SD->IO)->shm.put (shm_offset);
-	storeDiskdIOCallback(sio, DISK_ERROR);
+	storeDiskdIOCallback(this, DISK_ERROR);
     }
     diskd_stats.write.ops++;
 }
Index: squid3/src/fs/ufs/store_dir_ufs.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/ufs/store_dir_ufs.cc,v
retrieving revision 1.1.20.6
retrieving revision 1.1.20.7
diff -u -r1.1.20.6 -r1.1.20.7
--- squid3/src/fs/ufs/store_dir_ufs.cc	11 Dec 2002 11:15:20 -0000	1.1.20.6
+++ squid3/src/fs/ufs/store_dir_ufs.cc	11 Dec 2002 21:45:23 -0000	1.1.20.7
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_ufs.cc,v 1.1.20.6 2002/12/11 11:15:20 rbcollins Exp $
+ * $Id: store_dir_ufs.cc,v 1.1.20.7 2002/12/11 21:45:23 rbcollins Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -186,7 +186,6 @@
     sd->obj.create = commonUFSCreate;
     sd->obj.open = commonUFSOpen;
     sd->obj.close = storeUfsClose;
-    sd->obj.write = storeUfsWrite;
     sd->obj.unlink = storeUfsUnlink;
     sd->log.open = commonUfsDirOpenSwapLog;
     sd->log.close = commonUfsDirCloseSwapLog;
Index: squid3/src/fs/ufs/store_io_ufs.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/ufs/store_io_ufs.cc,v
retrieving revision 1.3.10.29
retrieving revision 1.3.10.30
diff -u -r1.3.10.29 -r1.3.10.30
--- squid3/src/fs/ufs/store_io_ufs.cc	11 Dec 2002 11:44:18 -0000	1.3.10.29
+++ squid3/src/fs/ufs/store_io_ufs.cc	11 Dec 2002 21:45:23 -0000	1.3.10.30
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_ufs.cc,v 1.3.10.29 2002/12/11 11:44:18 rbcollins Exp $
+ * $Id: store_io_ufs.cc,v 1.3.10.30 2002/12/11 21:45:23 rbcollins Exp $
  *
  * DEBUG: section 79    Storage Manager UFS Interface
  * AUTHOR: Duane Wessels
@@ -287,17 +287,16 @@
 }
 
 void
-storeUfsWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t offset, FREE * free_func)
+ufsstate_t::write(char *buf, size_t size, off_t offset, FREE * free_func)
 {
-    ufsstate_t *ufsstate = dynamic_cast<ufsstate_t *>(sio);
-    debug(79, 3) ("storeUfsWrite: dirn %d, fileno %08X, FD %d\n", sio->swap_dirn, sio->swap_filen, ufsstate->fd);
-    ufsstate->writing = true;
-    file_write(ufsstate->fd,
+    debug(79, 3) ("storeUfsWrite: dirn %d, fileno %08X, FD %d\n", swap_dirn, swap_filen, fd);
+    writing = true;
+    file_write(fd,
 	offset,
 	buf,
 	size,
 	storeUfsWriteDone,
-	sio,
+	this,
 	free_func);
 }
 
Index: squid3/src/fs/ufs/store_ufs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/ufs/Attic/store_ufs.h,v
retrieving revision 1.1.20.19
retrieving revision 1.1.20.20
diff -u -r1.1.20.19 -r1.1.20.20
--- squid3/src/fs/ufs/store_ufs.h	11 Dec 2002 11:44:19 -0000	1.1.20.19
+++ squid3/src/fs/ufs/store_ufs.h	11 Dec 2002 21:45:23 -0000	1.1.20.20
@@ -41,6 +41,7 @@
     ~ufsstate_t();
     int fd;
     void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data);
+    void write(char *buf, size_t size, off_t offset, FREE * free_func);
     void ioCompletedNotification();
     void readCompleted(const char *buf, int len, int errflag);
     void closeCompleted();
@@ -55,7 +56,6 @@
  * Store IO stuff
  */
 extern STOBJCLOSE storeUfsClose;
-extern STOBJWRITE storeUfsWrite;
 extern STOBJUNLINK storeUfsUnlink;
 #include "IOStrategy.h"
 class UfsIO : public UFSStrategy
