--------------------- PatchSet 5851 Date: 2003/08/03 15:48:27 Author: serassio Branch: nt-2_5 Tag: (none) Log: Synced awin32 with aufs changes Members: src/fs/awin32/store_dir_aufs.c:1.1.62.13->1.1.62.14 src/fs/awin32/store_io_aufs.c:1.1.62.14->1.1.62.15 Index: squid/src/fs/awin32/store_dir_aufs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/awin32/Attic/store_dir_aufs.c,v retrieving revision 1.1.62.13 retrieving revision 1.1.62.14 diff -u -r1.1.62.13 -r1.1.62.14 --- squid/src/fs/awin32/store_dir_aufs.c 3 Jun 2003 13:13:32 -0000 1.1.62.13 +++ squid/src/fs/awin32/store_dir_aufs.c 3 Aug 2003 15:48:27 -0000 1.1.62.14 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_aufs.c,v 1.1.62.13 2003/06/03 13:13:32 serassio Exp $ + * $Id: store_dir_aufs.c,v 1.1.62.14 2003/08/03 15:48:27 serassio Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -702,7 +702,8 @@ debug(47, 3) ("storeAufsDirGetNextFile: flag=%d, %d: /%02X/%02X\n", rb->flags.init, rb->sd->index, - rb->curlvl1, rb->curlvl2); + rb->curlvl1, + rb->curlvl2); if (rb->done) return -2; while (fd < 0 && rb->done == 0) { @@ -718,8 +719,7 @@ if (0 == rb->in_dir) { /* we need to read in a new directory */ snprintf(rb->fullpath, SQUID_MAXPATHLEN, "%s/%02X/%02X", rb->sd->path, - rb->curlvl1, - rb->curlvl2); + rb->curlvl1, rb->curlvl2); if (dirs_opened) return -1; rb->td = opendir(rb->fullpath); @@ -1325,7 +1325,8 @@ * This is kinda cheap, but so we need this priority hack? */ } - debug(47, 3) ("storeMaintainSwapSpace: f=%f, max_scan=%d, max_remove=%d\n", f, max_scan, max_remove); + debug(47, 3) ("storeMaintainSwapSpace: f=%f, max_scan=%d, max_remove=%d\n", + f, max_scan, max_remove); walker = SD->repl->PurgeInit(SD->repl, max_scan); while (1) { if (SD->cur_size < SD->low_size) Index: squid/src/fs/awin32/store_io_aufs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/awin32/Attic/store_io_aufs.c,v retrieving revision 1.1.62.14 retrieving revision 1.1.62.15 diff -u -r1.1.62.14 -r1.1.62.15 --- squid/src/fs/awin32/store_io_aufs.c 19 Jun 2003 21:11:09 -0000 1.1.62.14 +++ squid/src/fs/awin32/store_io_aufs.c 3 Aug 2003 15:48:27 -0000 1.1.62.15 @@ -1,6 +1,6 @@ /* - * $Id: store_io_aufs.c,v 1.1.62.14 2003/06/19 21:11:09 serassio Exp $ + * $Id: store_io_aufs.c,v 1.1.62.15 2003/08/03 15:48:27 serassio Exp $ * * DEBUG: section 79 Storage Manager awin32 Interface * AUTHOR: Robert Collins @@ -96,6 +96,7 @@ sio->e = e; cbdataLock(callback_data); Opening_FD++; + statCounter.syscalls.disk.opens++; #if ASYNC_OPEN aioOpen(path, O_RDONLY | O_BINARY, 0644, storeAufsOpenDone, sio); #else @@ -150,6 +151,7 @@ sio->e = (StoreEntry *) e; cbdataLock(callback_data); Opening_FD++; + statCounter.syscalls.disk.opens++; #if ASYNC_CREATE aioOpen(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644, storeAufsOpenDone, sio); #else @@ -212,8 +214,10 @@ aiostate->flags.reading = 1; #if ASYNC_READ aioRead(aiostate->fd, offset, size, storeAufsReadDone, sio); + statCounter.syscalls.disk.reads++; #else file_read(aiostate->fd, buf, size, offset, storeAufsReadDone, sio); + /* file_read() increments syscalls.disk.reads */ #endif } @@ -252,9 +256,11 @@ aiostate->flags.writing = 1; aioWrite(aiostate->fd, offset, buf, size, storeAufsWriteDone, sio, free_func); + statCounter.syscalls.disk.writes++; #else file_write(aiostate->fd, offset, buf, size, storeAufsWriteDone, sio, free_func); + /* file_write() increments syscalls.disk.writes */ #endif } @@ -266,6 +272,7 @@ storeAufsDirReplRemove(e); storeAufsDirMapBitReset(SD, e->swap_filen); storeAufsDirUnlinkFile(SD, e->swap_filen); + statCounter.syscalls.disk.unlinks++; } /* === STATIC =========================================================== */ @@ -458,6 +465,7 @@ aioClose(fd); fd_close(fd); store_open_disk_fd--; + statCounter.syscalls.disk.closes++; debug(79, 9) ("%s:%d\n", __FILE__, __LINE__); }