Re: store disk files open

From: Henrik Nordstrom <>
Date: Mon, 10 Dec 2001 14:03:01 +0100

On Sunday 09 December 2001 18.49, Adrian Chadd wrote:

> Ok. If I revert patch rev 1.13 to squid/src/fs/aufs/store_io_aufs.c,
> I get correct-looking statistics again.


> Henrik, since you committed this, do you remember the exact issue?
> store_io_disk_fd seems to be incremented right in store_io_aufs.c,
> so if there were any "leaks" in the stats they may have been coming
> from somewhere else.. ?

The issue the change tries to address is opens rejected by aioOpen(). In such
cases the storeAufsOpen/Create calls completes and increases
store_open_disk_fd, but then aioOpen fails and calls the callback with a fd
of -1 (and an error code). The original code then forgot to decrease

The patch tries to address this by simply making sure each sio
creation/destruction is paired with store_io_disk_fd accounting. You should
be able to move the store_open_disk_fd accounting to next to the sio
cbdataAlloc/Free() calls.

Everything looks fine in the (changed) code to me. If you figure out what is
going on and why, please tell me as I am obviously blind to something here
and I don't like being blind.

Received on Mon Dec 10 2001 - 10:51:44 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:40 MST