From: wessels <> Date: Mon, 29 May 2000 09:10:39 +0000 (+0000) Subject: DW: X-Git-Tag: SQUID_3_0_PRE1~1956 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d037d01eab972d95f3f6b4042423ccd9cb489db;p=thirdparty%2Fsquid.git DW: - Running the current code on an older 2.4 cache results in unlink errors. During 2.4 development, we changed the way swap file numbers are assigned and stored. The high 16 bits used to encode the SD index number. There used to be a call to storeDirProperFileno here that re-assigned the index bits. Now, for backwards compatibility, we just need to mask it off. --- diff --git a/src/fs/diskd/store_dir_diskd.cc b/src/fs/diskd/store_dir_diskd.cc index 5477e18e71..6e737d7a9b 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.9 2000/05/29 01:53:58 wessels Exp $ + * $Id: store_dir_diskd.cc,v 1.10 2000/05/29 03:10:39 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -686,6 +686,15 @@ storeDiskdDirRebuildFromSwapLog(void *data) continue; if (s.op >= SWAP_LOG_MAX) continue; + /* + * BC: during 2.4 development, we changed the way swap file + * numbers are assigned and stored. The high 16 bits used + * to encode the SD index number. There used to be a call + * to storeDirProperFileno here that re-assigned the index + * bits. Now, for backwards compatibility, we just need + * to mask it off. + */ + s.swap_filen &= 0x00FFFFFF; debug(20, 3) ("storeDiskdDirRebuildFromSwapLog: %s %s %08X\n", swap_log_op_str[(int) s.op], storeKeyText(s.key), diff --git a/src/fs/ufs/store_dir_ufs.cc b/src/fs/ufs/store_dir_ufs.cc index 9c7db81b00..659528f5e7 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.3 2000/05/29 01:54:02 wessels Exp $ + * $Id: store_dir_ufs.cc,v 1.4 2000/05/29 03:10:42 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -537,6 +537,15 @@ storeUfsDirRebuildFromSwapLog(void *data) continue; if (s.op >= SWAP_LOG_MAX) continue; + /* + * BC: during 2.4 development, we changed the way swap file + * numbers are assigned and stored. The high 16 bits used + * to encode the SD index number. There used to be a call + * to storeDirProperFileno here that re-assigned the index + * bits. Now, for backwards compatibility, we just need + * to mask it off. + */ + s.swap_filen &= 0x00FFFFFF; debug(20, 3) ("storeUfsDirRebuildFromSwapLog: %s %s %08X\n", swap_log_op_str[(int) s.op], storeKeyText(s.key),