--------------------- PatchSet 1132 Date: 2004/12/26 09:17:52 Author: serassio Branch: nt Tag: (none) Log: Cleanup of COSS sources after Windows<==>DISKIO merge Members: src/fs/coss/store_dir_coss.cc:1.8.2.18->1.8.2.19 src/fs/coss/store_io_coss.cc:1.6.2.7->1.6.2.8 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.8.2.18 retrieving revision 1.8.2.19 diff -u -r1.8.2.18 -r1.8.2.19 --- squid3/src/fs/coss/store_dir_coss.cc 22 Dec 2004 17:18:00 -0000 1.8.2.18 +++ squid3/src/fs/coss/store_dir_coss.cc 26 Dec 2004 09:17:52 -0000 1.8.2.19 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_coss.cc,v 1.8.2.18 2004/12/22 17:18:00 serassio Exp $ + * $Id: store_dir_coss.cc,v 1.8.2.19 2004/12/26 09:17:52 serassio Exp $ * * DEBUG: section 47 Store COSS Directory Routines * AUTHOR: Eric Stern @@ -342,20 +342,6 @@ io->init(); openLog(); storeCossDirRebuild(this); -/*<<<<<<< store_dir_coss.cc -#ifdef _SQUID_WIN32_ - - fd = aio_open(path, O_RDWR | O_CREAT); -#else - - fd = file_open(path, O_RDWR | O_CREAT); -#endif - - if (fd < 0) { - debug(47, 1) ("%s: %s\n", path, xstrerror()); - fatal("storeCossDirInit: Failed to open a COSS file."); - } -=======*/ theFile = io->newFile(path); theFile->open(O_RDWR | O_CREAT, 0644, this); @@ -927,19 +913,6 @@ /* we are shutting down, flush all membufs to disk */ CossSwapDir::~CossSwapDir() { -/*<<<<<<< store_dir_coss.cc - sync(); /* This'll call a_file_syncqueue() */ - a_file_closequeue(&aq); -#ifdef _SQUID_WIN32_ - - aio_close(fd); -#else - - file_close(fd); -#endif - - fd = -1; -======= */ io->sync(); theFile->close(); delete io; 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.6.2.7 retrieving revision 1.6.2.8 diff -u -r1.6.2.7 -r1.6.2.8 --- squid3/src/fs/coss/store_io_coss.cc 21 Dec 2004 15:39:33 -0000 1.6.2.7 +++ squid3/src/fs/coss/store_io_coss.cc 26 Dec 2004 09:17:52 -0000 1.6.2.8 @@ -1,6 +1,6 @@ /* - * $Id: store_io_coss.cc,v 1.6.2.7 2004/12/21 15:39:33 serassio Exp $ + * $Id: store_io_coss.cc,v 1.6.2.8 2004/12/26 09:17:52 serassio Exp $ * * DEBUG: section 79 Storage Manager COSS Interface * AUTHOR: Eric Stern @@ -486,10 +486,6 @@ CossMemBuf *t; dlink_node *m; int end; -#ifdef _SQUID_WIN32_ - - LPOVERLAPPED Overlapped; -#endif /* First, flush pending IO ops */ io->sync(); @@ -507,47 +503,11 @@ sleep(5); /* XXX EEEWWW! */ } -/*<<<<<<< store_io_coss.cc - end = (t == current_membuf) ? current_offset : t->diskend; - -#ifdef _SQUID_WIN32_ - /* Allocate an overlapped structure. */ - Overlapped = (LPOVERLAPPED) xcalloc(1, sizeof(OVERLAPPED)); - -#if COSS_OFFSET_BITS==64 - - Overlapped->Offset = (DWORD)(t->diskstart % 0x100000000); - Overlapped->OffsetHigh = (DWORD)(t->diskstart / 0x100000000); - -#else - - Overlapped->Offset = t->diskstart; - Overlapped->OffsetHigh = 0; - -#endif - - Overlapped->hEvent = NULL; - WriteFile((HANDLE)_get_osfhandle(fd), /* handle to file */ - t->buffer, /* data buffer */ - (size_t)(end - t->diskstart), /* number of bytes to write */ - NULL, /* number of bytes written */ - Overlapped); /* overlapped buffer */ - -#else - - lseek(fd, t->diskstart, SEEK_SET); -======= */ end = (t == current_membuf) ? current_offset : t->diskend; -/*<<<<<<< store_io_coss.cc - FD_WRITE_METHOD(fd, t->buffer, end - t->diskstart); -*/ if ((size_t)end > t->diskstart) theFile->write(new CossWrite(WriteRequest((char const *)&t->buffer, t->diskstart, end - t->diskstart, NULL), t)); -/*<<<<<<< store_io_coss.cc -#endif -======= */ /* and flush */ io->sync(); }