Re: AUFS

From: Adrian Chadd <adrian@dont-contact.us>
Date: Tue, 11 Dec 2001 02:09:02 -0700

This seems to fix the FD accounting.
Don't know why .. but it just makes sense to do it this way.

Do you mind if I commit this?

Adrian

Index: src/fs/aufs/store_io_aufs.c
===================================================================
RCS file: /server/cvs-server/squid/squid/src/fs/aufs/store_io_aufs.c,v
retrieving revision 1.14
diff -u -r1.14 store_io_aufs.c
--- src/fs/aufs/store_io_aufs.c 2001/10/24 07:45:37 1.14
+++ src/fs/aufs/store_io_aufs.c 2001/12/11 03:28:07
@@ -71,7 +71,6 @@
 #else
     storeAufsOpenDone(fd, sio, fd, 0);
 #endif
- store_open_disk_fd++;
     return sio;
 }
 
@@ -126,7 +125,6 @@
 #else
     storeAufsOpenDone(fd, sio, fd, 0);
 #endif
- store_open_disk_fd++;
 
     /* now insert into the replacement policy */
     storeAufsDirReplAdd(SD, e);
@@ -284,6 +282,7 @@
         storeAufsIOCallback(sio, DISK_ERROR);
         return;
     }
+ store_open_disk_fd++;
     aiostate->fd = fd;
     commSetCloseOnExec(fd);
     fd_open(fd, FD_FILE, storeAufsDirFullPath(INDEXSD(sio->swap_dirn), sio->swap_filen, NULL));
@@ -409,12 +408,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__);
 }
Received on Tue Dec 11 2001 - 02:09:02 MST

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