patch

From: Adrian Chadd <adrian@dont-contact.us>
Date: Fri, 9 Jun 2000 02:59:01 +0800

Here is a patch which hno pointed out is left in modio. The first makes
the diskd code use truncate or unlink where applicable, and the second
brings the ufs code up to the current abuse level. :-)

I'll commit it Saturday morning GMT around 10 or 11am unless someone
has an objection.

Adrian

----- Forwarded message from Adrian Chadd <adrian@ywing.creative.net.au> -----

Date: Thu, 8 Jun 2000 21:00:58 +0200 (CEST)
From: Adrian Chadd <adrian@ywing.creative.net.au>
To: adrian@creative.net.au

Index: src/fs/diskd/diskd.c
===================================================================
RCS file: /server/cvs-server/squid/squid/src/fs/diskd/diskd.c,v
retrieving revision 1.4
diff -u -r1.4 diskd.c
--- src/fs/diskd/diskd.c 2000/05/29 01:37:11 1.4
+++ src/fs/diskd/diskd.c 2000/06/08 18:53:33
@@ -187,7 +187,11 @@
 static int
 do_unlink(diomsg * r, int len, const char *buf)
 {
+#if USE_TRUNCATE
     if (truncate(buf, 0) < 0) {
+#else
+ if (unlink(buf) < 0) {
+#endif
         fprintf(stderr, "%d UNLNK id %d %s: ", (int) mypid, r->id, buf);
         perror("truncate");
         return -errno;
Index: src/fs/ufs/store_io_ufs.c
===================================================================
RCS file: /server/cvs-server/squid/squid/src/fs/ufs/store_io_ufs.c,v
retrieving revision 1.2
diff -u -r1.2 store_io_ufs.c
--- src/fs/ufs/store_io_ufs.c 2000/05/12 00:29:20 1.2
+++ src/fs/ufs/store_io_ufs.c 2000/06/08 18:53:33
@@ -186,6 +186,7 @@
 {
     debug(79, 3) ("storeUfsUnlink: fileno %08X\n", e->swap_filen);
     storeUfsDirReplRemove(e);
+ storeUfsDirMapBitReset(SD, e->swap_filen);
     storeUfsDirUnlinkFile(SD, e->swap_filen);
 }
 

----- End forwarded message -----

-- 
Adrian Chadd			Build a man a fire, and he's warm for the
<adrian@creative.net.au>	rest of the evening. Set a man on fire and
				he's warm for the rest of his life.
Received on Thu Jun 08 2000 - 12:59:15 MDT

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