From: hno <> Date: Wed, 14 Nov 2001 01:11:19 +0000 (+0000) Subject: Clean swap.state rotation was completely fucked up for most stores.. and X-Git-Tag: SQUID_3_0_PRE1~1303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be23bf5673602a4edc9450ca4fbc321fc38f9c40;p=thirdparty%2Fsquid.git Clean swap.state rotation was completely fucked up for most stores.. and has been for a very long time (probably since modio merge). Only diskd worked. --- diff --git a/src/fs/aufs/store_dir_aufs.cc b/src/fs/aufs/store_dir_aufs.cc index 8d436669bf..4db0718d8f 100644 --- a/src/fs/aufs/store_dir_aufs.cc +++ b/src/fs/aufs/store_dir_aufs.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_aufs.cc,v 1.39 2001/10/24 07:45:37 hno Exp $ + * $Id: store_dir_aufs.cc,v 1.40 2001/11/13 18:11:19 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -969,9 +969,6 @@ storeAufsDirWriteCleanStart(SwapDir * sd) state->outbuf = xcalloc(CLEAN_BUF_SZ, 1); state->outbuf_offset = 0; state->walker = sd->repl->WalkInit(sd->repl); -#if !(defined(_SQUID_OS2_) || defined (_SQUID_CYGWIN_)) - unlink(state->new); -#endif unlink(state->cln); debug(20, 3) ("storeDirWriteCleanLogs: opened %s, FD %d\n", state->new, state->fd); diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 7a5f390c9b..39549e831a 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_coss.cc,v 1.29 2001/08/16 00:16:20 hno Exp $ + * $Id: store_dir_coss.cc,v 1.30 2001/11/13 18:11:20 hno Exp $ * * DEBUG: section 81 Store COSS Directory Routines * AUTHOR: Eric Stern @@ -494,7 +494,6 @@ storeCossDirWriteCleanStart(SwapDir * sd) state->cln = xstrdup(storeCossDirSwapLogFile(sd, ".last-clean")); state->outbuf = xcalloc(CLEAN_BUF_SZ, 1); state->outbuf_offset = 0; - unlink(state->new); unlink(state->cln); state->current = cs->index.tail; debug(20, 3) ("storeCOssDirWriteCleanLogs: opened %s, FD %d\n", diff --git a/src/fs/diskd/store_dir_diskd.cc b/src/fs/diskd/store_dir_diskd.cc index b1fb78a18d..b73f4721df 100644 --- a/src/fs/diskd/store_dir_diskd.cc +++ b/src/fs/diskd/store_dir_diskd.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_diskd.cc,v 1.57 2001/10/24 07:45:38 hno Exp $ + * $Id: store_dir_diskd.cc,v 1.58 2001/11/13 18:11:20 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -1150,7 +1150,6 @@ storeDiskdDirWriteCleanStart(SwapDir * sd) state->outbuf = xcalloc(CLEAN_BUF_SZ, 1); state->outbuf_offset = 0; state->walker = sd->repl->WalkInit(sd->repl); - unlink(state->new); unlink(state->cln); state->fd = file_open(state->new, O_WRONLY | O_CREAT | O_TRUNC); if (state->fd < 0) { diff --git a/src/fs/ufs/store_dir_ufs.cc b/src/fs/ufs/store_dir_ufs.cc index 5511aaa527..bc7d066e56 100644 --- a/src/fs/ufs/store_dir_ufs.cc +++ b/src/fs/ufs/store_dir_ufs.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_ufs.cc,v 1.38 2001/10/24 07:45:38 hno Exp $ + * $Id: store_dir_ufs.cc,v 1.39 2001/11/13 18:11:21 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -967,9 +967,6 @@ storeUfsDirWriteCleanStart(SwapDir * sd) state->outbuf = xcalloc(CLEAN_BUF_SZ, 1); state->outbuf_offset = 0; state->walker = sd->repl->WalkInit(sd->repl); -#if !(defined(_SQUID_OS2_) || defined (_SQUID_CYGWIN_)) - unlink(state->new); -#endif unlink(state->cln); debug(20, 3) ("storeDirWriteCleanLogs: opened %s, FD %d\n", state->new, state->fd);