]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Tue, 18 Jul 2000 13:34:32 +0000 (13:34 +0000)
committerwessels <>
Tue, 18 Jul 2000 13:34:32 +0000 (13:34 +0000)
 - Logic bug in I/O counters.  Open and Create both now share "OpenDone"
   so we have to look at ->mode to see which one gets credit.

src/fs/diskd/store_io_diskd.cc

index b46f26b4b85d9d56dd8b8dc492baceaa99d07d0e..7218226506c536f6ee4a91b897967cf1e6cf896e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_diskd.cc,v 1.14 2000/07/16 07:28:38 wessels Exp $
+ * $Id: store_io_diskd.cc,v 1.15 2000/07/18 07:34:32 wessels Exp $
  *
  * DEBUG: section 81    Squid-side DISKD I/O functions.
  * AUTHOR: Duane Wessels
@@ -307,10 +307,10 @@ storeDiskdOpenDone(diomsg * M)
     debug(81, 3) ("storeDiskdOpenDone: dirno %d, fileno %08x status %d\n",
        sio->swap_dirn, sio->swap_filen, M->status);
     if (M->status < 0) {
-       diskd_stats.open.fail++;
+       sio->mode == O_RDONLY ? diskd_stats.open.fail++ : diskd_stats.create.fail++;
        storeDiskdIOCallback(sio, DISK_ERROR);
     } else {
-       diskd_stats.open.success++;
+       sio->mode == O_RDONLY ? diskd_stats.open.success++ : diskd_stats.create.success++;
     }
 }