--------------------- PatchSet 10684 Date: 2008/07/25 08:00:39 Author: adri Branch: delay_pool_write Tag: (none) Log: class5 -> class6 Members: src/delay_pools.c:1.21.4.11->1.21.4.12 Index: squid/src/delay_pools.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/delay_pools.c,v retrieving revision 1.21.4.11 retrieving revision 1.21.4.12 diff -u -r1.21.4.11 -r1.21.4.12 --- squid/src/delay_pools.c 25 Jul 2008 07:22:39 -0000 1.21.4.11 +++ squid/src/delay_pools.c 25 Jul 2008 08:00:39 -0000 1.21.4.12 @@ -1,6 +1,6 @@ /* - * $Id: delay_pools.c,v 1.21.4.11 2008/07/25 07:22:39 adri Exp $ + * $Id: delay_pools.c,v 1.21.4.12 2008/07/25 08:00:39 adri Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: David Luyer @@ -119,7 +119,7 @@ * + The entry is cleared on fd close * + The entry is -overwritten- if the fd changes pool; its not closed/reopened! */ -static char *delay_class_5_fds; +static char *delay_class_6_fds; static time_t delay_pools_last_update = 0; static hash_table *delay_id_ptr_hash = NULL; static long memory_used = 0; @@ -166,7 +166,7 @@ { delay_pools_last_update = getCurrentTime(); delay_no_delay = xcalloc(1, Squid_MaxFD); - delay_class_5_fds = xcalloc(1, Squid_MaxFD); + delay_class_6_fds = xcalloc(1, Squid_MaxFD); cachemgrRegister("delay", "Delay Pool Levels", delayPoolStats, 0, 1); cachemgrRegister("delay2", "Delay Pool Statistics", delayPoolStatsNew, 0, 1); eventAdd("delayPoolsUpdate", delayPoolsUpdate, NULL, 1.0, 192); @@ -350,7 +350,7 @@ delayCloseFd(int fd) { delay_no_delay[fd] = 0; /* XXX ? */ - delay_class_5_fds[fd] = 0; + delay_class_6_fds[fd] = 0; } static delay_id @@ -540,7 +540,7 @@ position = fd; delay_data[pool].class6->fds[position].aggregate = (int) (((double) Config.Delay.rates[pool]->individual.max_bytes * Config.Delay.initial) / 100); - delay_class_5_fds[fd] = pool + 1; + delay_class_6_fds[fd] = pool + 1; return delayId(pool + 1, position); } @@ -578,7 +578,7 @@ /* Update per-FD allowances */ assert(Biggest_FD < class6->fds_size); for (fd = 0; fd < Biggest_FD; fd++) { - if (delay_class_5_fds[fd] != (pool + 1)) + if (delay_class_6_fds[fd] != (pool + 1)) continue; class6->fds[fd].aggregate += restore_bytes; if (class6->fds[fd].aggregate > rates->individual.max_bytes) @@ -1096,9 +1096,9 @@ delayPoolStatsAg(sentry, pool, type, rate, class6->aggregate, class6->aggregate_bytes); /* Per-FD stats! */ - /* delay_class_5_fds[] contains the pool id starting from 1, not from 0 */ + /* delay_class_6_fds[] contains the pool id starting from 1, not from 0 */ for (i = 0; i < Biggest_FD; i++) { - if (delay_class_5_fds[i] == (pool+1)) { + if (delay_class_6_fds[i] == (pool+1)) { if (type == 1) { storeAppendPrintf(sentry, " FD: %d, aggregate %d\n", i, class6->fds[i].aggregate); } else {