--------------------- PatchSet 351 Date: 2002/12/13 11:57:47 Author: rbcollins Branch: unify-io Tag: (none) Log: move to final home Members: src/ufscommon.cc:1.4.10.14->1.4.10.15 src/fs/ufs/store_dir_ufs.cc:1.1.20.14->1.1.20.15 Index: squid3/src/ufscommon.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ufscommon.cc,v retrieving revision 1.4.10.14 retrieving revision 1.4.10.15 diff -u -r1.4.10.14 -r1.4.10.15 --- squid3/src/ufscommon.cc 13 Dec 2002 11:52:01 -0000 1.4.10.14 +++ squid3/src/ufscommon.cc 13 Dec 2002 11:57:47 -0000 1.4.10.15 @@ -1,5 +1,5 @@ /* - * $Id: ufscommon.cc,v 1.4.10.14 2002/12/13 11:52:01 rbcollins Exp $ + * $Id: ufscommon.cc,v 1.4.10.15 2002/12/13 11:57:47 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -1552,36 +1552,3 @@ filn); return fullpath; } - -void -UFSSwapDir::dumpEntry(StoreEntry &e) const -{ - debug(47, 0) ("commonUfsCleanupDoubleCheck: FILENO %08X\n", e.swap_filen); - debug(47, 0) ("commonUfsCleanupDoubleCheck: PATH %s\n", - fullPath(e.swap_filen, NULL)); - storeEntryDump(&e, 0); -} - -/* - * commonUfsCleanupDoubleCheck - * - * This is called by storeCleanup() if -S was given on the command line. - */ -bool -UFSSwapDir::doubleCheck(StoreEntry & e) -{ - struct stat sb; - if (stat(fullPath(e.swap_filen, NULL), &sb) < 0) { - debug(47, 0) ("commonUfsCleanupDoubleCheck: MISSING SWAP FILE\n"); - dumpEntry(e); - return true; - } - if ((off_t)e.swap_file_sz != sb.st_size) { - debug(47, 0) ("commonUfsCleanupDoubleCheck: SIZE MISMATCH\n"); - debug(47, 0) ("commonUfsCleanupDoubleCheck: ENTRY SIZE: %ld, FILE SIZE: %ld\n", - (long int) e.swap_file_sz, (long int) sb.st_size); - dumpEntry(e); - return true; - } - return false; -} Index: squid3/src/fs/ufs/store_dir_ufs.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/ufs/store_dir_ufs.cc,v retrieving revision 1.1.20.14 retrieving revision 1.1.20.15 diff -u -r1.1.20.14 -r1.1.20.15 --- squid3/src/fs/ufs/store_dir_ufs.cc 13 Dec 2002 11:35:59 -0000 1.1.20.14 +++ squid3/src/fs/ufs/store_dir_ufs.cc 13 Dec 2002 11:57:47 -0000 1.1.20.15 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_ufs.cc,v 1.1.20.14 2002/12/13 11:35:59 rbcollins Exp $ + * $Id: store_dir_ufs.cc,v 1.1.20.15 2002/12/13 11:57:47 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -262,3 +262,36 @@ storefs->newfunc = storeUfsNew; ufs_initialised = 1; } + +void +UFSSwapDir::dumpEntry(StoreEntry &e) const +{ + debug(47, 0) ("commonUfsCleanupDoubleCheck: FILENO %08X\n", e.swap_filen); + debug(47, 0) ("commonUfsCleanupDoubleCheck: PATH %s\n", + fullPath(e.swap_filen, NULL)); + storeEntryDump(&e, 0); +} + +/* + * commonUfsCleanupDoubleCheck + * + * This is called by storeCleanup() if -S was given on the command line. + */ +bool +UFSSwapDir::doubleCheck(StoreEntry & e) +{ + struct stat sb; + if (stat(fullPath(e.swap_filen, NULL), &sb) < 0) { + debug(47, 0) ("commonUfsCleanupDoubleCheck: MISSING SWAP FILE\n"); + dumpEntry(e); + return true; + } + if ((off_t)e.swap_file_sz != sb.st_size) { + debug(47, 0) ("commonUfsCleanupDoubleCheck: SIZE MISMATCH\n"); + debug(47, 0) ("commonUfsCleanupDoubleCheck: ENTRY SIZE: %ld, FILE SIZE: %ld\n", + (long int) e.swap_file_sz, (long int) sb.st_size); + dumpEntry(e); + return true; + } + return false; +}