I posted this earlier this month. While the patch I attached then
probably would have worked, this one gets more to the root of the problem.
--- store_io_aufs.c Thu Sep 6 20:51:49 2001
+++ store_io_aufs.c.new Fri Sep 21 16:34:25 2001
@@ -428,12 +428,12 @@
cbdataUnlock(their_data);
aiostate->fd = -1;
cbdataFree(sio);
+ store_open_disk_fd--;
if (fd < 0)
return;
debug(78, 3) ("%s:%d\n", __FILE__, __LINE__);
aioClose(fd);
fd_close(fd);
- store_open_disk_fd--;
debug(78, 3) ("%s:%d\n", __FILE__, __LINE__);
}
In a nutshell, squid currently increments store_open_disk_fd whether the
open succeeds or not, but only closes it if the open succeeds. 'File not
found' and other errors will run up the counter. Moving the decrement
above that check keeps the counter in step with the actual open files.
-- Brian
On Saturday 01 September 2001 03:39 am, you wrote:
> Situations such as this:
> Number of file desc currently in use: 510
> Store Disk files open: 959
>
> Show an error in the accounting of disk FD in aufs. Basically, it
> counts its chickens before they hatch by upping the count before it
> tries to open the file. That's all well and good, but the count wasn't
> decremented if the open failed. It needs something like
Received on Fri Sep 21 2001 - 14:45:27 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:27 MST