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

From: Brian <hiryuu@dont-contact.us>
Date: Sat, 1 Sep 2001 03:39:28 -0400

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

--- 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.

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?

        -- Brian
Received on Sat Sep 01 2001 - 01:39:28 MDT

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