]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
The last two changes from modio:
authoradrian <>
Tue, 27 Jun 2000 02:17:12 +0000 (02:17 +0000)
committeradrian <>
Tue, 27 Jun 2000 02:17:12 +0000 (02:17 +0000)
* bring ufs to the latest incarnation of ufs-style object/file/bitmap
  removal.
* Make the use of truncate() in diskd.c dependant upon #if USE_TRUNCATE,
  like it should be.

src/fs/diskd/diskd.cc
src/fs/ufs/store_io_ufs.cc

index 53ff82e7185369855c871401c8423cde509e0a49..5893d8e92fe11c752ed11477927a34e8b71e0b01 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: diskd.cc,v 1.4 2000/05/29 01:37:11 wessels Exp $
+ * $Id: diskd.cc,v 1.5 2000/06/26 20:17:12 adrian Exp $
  *
  * DEBUG: section --    External DISKD process implementation.
  * AUTHOR: Harvest Derived
@@ -187,7 +187,11 @@ do_write(diomsg * r, int len, const char *buf)
 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 257bc79eff6dc1f9b349ea185ed4601d8c9ce51f..6364396da51729f6e540b1c2618128f15462a55c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_ufs.cc,v 1.2 2000/05/12 00:29:20 wessels Exp $
+ * $Id: store_io_ufs.cc,v 1.3 2000/06/26 20:17:13 adrian Exp $
  *
  * DEBUG: section 79    Storage Manager UFS Interface
  * AUTHOR: Duane Wessels
@@ -186,6 +186,7 @@ storeUfsUnlink(SwapDir * SD, StoreEntry * e)
 {
     debug(79, 3) ("storeUfsUnlink: fileno %08X\n", e->swap_filen);
     storeUfsDirReplRemove(e);
+    storeUfsDirMapBitReset(SD, e->swap_filen);
     storeUfsDirUnlinkFile(SD, e->swap_filen);
 }