Re: [squid-users] Found: "Disk files open" inaccuracy

From: Adrian Chadd <adrian@dont-contact.us>
Date: Sat, 1 Sep 2001 02:10:54 -0600

On Sat, Sep 01, 2001, Brian wrote:

> 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

Ta!

> --- store_io_aufs.c Thu Jan 4 19:30:39 2001
> +++ store_io_aufs.c.new Sat Sep 1 03:26:54 2001
> @@ -286,6 +286,7 @@
> errno = errflag;
> debug(78, 0) ("storeAufsOpenDone: %s\n", xstrerror());
> debug(78, 1) ("\t%s\n",
> storeAufsDirFullPath(INDEXSD(sio->swap_dirn), sio->swap_filen, NULL));
> + store_open_disk_fd--;
> storeAufsIOCallback(sio, DISK_ERROR);
> return;
> }
>
> Except it may need to be handled at a different point, since handling it
> inside the multithreaded area may create some fun races.

That isn't inside the multithreaded area, so it should be ok.
I'll note to check diskd and aufs in a few days.

> In a related note, if a user requests cached item X and another user also
> requests cached item X, should I expect squid to have two disk FDs
> assigned to the cache file for X (one for each request)? If so, why?

Yup. Reasons - dunno, the design choice was made before I came
about as a developer. It'll make the code much more complex if we
swapped the object in once and fed it to multiple people (since
if we haven't got what they need in RAM, we'll have to either
lseek() back to the beginning of the object to get the bits we've
since freed, or just open another FD.

Adrian
Received on Sat Sep 01 2001 - 02:10:55 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:01 MST