From 930416345bdd97fafea1112b1a05ca5e1f191ffd Mon Sep 17 00:00:00 2001 From: adrian <> Date: Tue, 27 Jun 2000 02:17:12 +0000 Subject: [PATCH] The last two changes from modio: * 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 | 6 +++++- src/fs/ufs/store_io_ufs.cc | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/fs/diskd/diskd.cc b/src/fs/diskd/diskd.cc index 53ff82e718..5893d8e92f 100644 --- a/src/fs/diskd/diskd.cc +++ b/src/fs/diskd/diskd.cc @@ -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; diff --git a/src/fs/ufs/store_io_ufs.cc b/src/fs/ufs/store_io_ufs.cc index 257bc79eff..6364396da5 100644 --- a/src/fs/ufs/store_io_ufs.cc +++ b/src/fs/ufs/store_io_ufs.cc @@ -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); } -- 2.47.3