--------------------- PatchSet 1461 Date: 2001/01/31 15:09:34 Author: adri Branch: sfs Tag: (none) Log: * fix some missing declarations * fix some wrongly-ordered variable declarations * actually set the swapdir load to 0%, so we always can swapout on it. Members: src/fs/sfs/sfs_interface.c:1.1.2.15->1.1.2.16 src/fs/sfs/sfs_lib.h:1.1.2.8->1.1.2.9 src/fs/sfs/sfs_llo.c:1.1.2.10->1.1.2.11 src/fs/sfs/sfs_util.c:1.1.2.11->1.1.2.12 src/fs/sfs/store_dir_sfs.c:1.1.2.6->1.1.2.7 Index: squid/src/fs/sfs/sfs_interface.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/sfs/Attic/sfs_interface.c,v retrieving revision 1.1.2.15 retrieving revision 1.1.2.16 diff -u -r1.1.2.15 -r1.1.2.16 --- squid/src/fs/sfs/sfs_interface.c 31 Jan 2001 05:49:37 -0000 1.1.2.15 +++ squid/src/fs/sfs/sfs_interface.c 31 Jan 2001 15:09:34 -0000 1.1.2.16 @@ -44,7 +44,7 @@ if (!(req = _sfs_create_requestor(sfsid,rt, io_type))) { return -1; } - assert((io_type == _SFS_SYNC) || dataptr); + assert((io_type == _SFS_IO_SYNC) || dataptr); if (dataptr) cbdataLock(dataptr); req->sfsinode = sfsinode; @@ -71,7 +71,7 @@ if(!(req = _sfs_create_requestor(sfsfd >> 24, _SFS_OP_CLOSE, io_type))) return -1; - assert((io_type == _SFS_SYNC) || dataptr); + assert((io_type == _SFS_IO_SYNC) || dataptr); if (dataptr) cbdataLock(dataptr); req->sfsfd = sfsfd; @@ -105,7 +105,7 @@ if(!(req = _sfs_create_requestor(sfsid, _SFS_OP_READ, io_type))) { return -1; } - assert((io_type == _SFS_SYNC) || dataptr); + assert((io_type == _SFS_IO_SYNC) || dataptr); if (dataptr) cbdataLock(dataptr); req->sfsfd = sfsfd; @@ -143,7 +143,7 @@ if (!(req = _sfs_create_requestor(sfsid,_SFS_OP_WRITE, io_type))) { return -1; } - assert((io_type == _SFS_SYNC) || dataptr); + assert((io_type == _SFS_IO_SYNC) || dataptr); if (dataptr) cbdataLock(dataptr); req->sfsfd = sfsfd; @@ -181,7 +181,7 @@ if (!(req = _sfs_create_requestor(sfsid, _SFS_OP_UNLINK, io_type))) { return -1; } - assert((io_type == _SFS_SYNC) || dataptr); + assert((io_type == _SFS_IO_SYNC) || dataptr); if (dataptr) cbdataLock(dataptr); req->sfsinode = sfsinode; Index: squid/src/fs/sfs/sfs_lib.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/sfs/Attic/sfs_lib.h,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- squid/src/fs/sfs/sfs_lib.h 28 Jan 2001 18:48:48 -0000 1.1.2.8 +++ squid/src/fs/sfs/sfs_lib.h 31 Jan 2001 15:09:35 -0000 1.1.2.9 @@ -36,6 +36,7 @@ extern sfs_openfile_t * _sfs_find_fd(int sfsfd); extern void _sfs_flush_bitmaps(int sfsid); extern int _sfs_flush_file(int sfsid, sfs_openfile_t *fd); +extern void _sfs_print_request(sfs_requestor *req); /* sfs_splay.c */ extern sfs_blockbuf_t * _sfs_blockbuf_create(); @@ -62,5 +63,7 @@ void *); extern sfsblock_t sfs_get_inode(sfsblock_t ); extern sfs_requestor * sfs_getcompleted(sfsid_t); +int sfs_openNextInode(sfsid_t sfsid, sfsblock_t *cur); + #endif /* !SFS_LIB_H */ Index: squid/src/fs/sfs/sfs_llo.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/sfs/Attic/sfs_llo.c,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -u -r1.1.2.10 -r1.1.2.11 --- squid/src/fs/sfs/sfs_llo.c 31 Jan 2001 05:49:37 -0000 1.1.2.10 +++ squid/src/fs/sfs/sfs_llo.c 31 Jan 2001 15:09:35 -0000 1.1.2.11 @@ -381,7 +381,7 @@ *cur = i; /* Note, should make an sio, but I'm too lazy - SYNC doesn't * _really_ need one... */ - return sfs_open(sfsid,i,0,_SFS_OP_OPEN_READ,_SFS_SYNC,NULL); + return sfs_open(sfsid,i,0,_SFS_OP_OPEN_READ,_SFS_IO_SYNC,NULL); } } *cur = 0; Index: squid/src/fs/sfs/sfs_util.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/sfs/Attic/sfs_util.c,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -r1.1.2.11 -r1.1.2.12 --- squid/src/fs/sfs/sfs_util.c 29 Jan 2001 14:09:30 -0000 1.1.2.11 +++ squid/src/fs/sfs/sfs_util.c 31 Jan 2001 15:09:35 -0000 1.1.2.12 @@ -399,7 +399,8 @@ /* This function prints out the contents of a request - debug function. */ void -_sfs_print_request(sfs_requestor *req) { +_sfs_print_request(sfs_requestor *req) +{ printf(" fd %d: %d/%d - type %d, state %d, buflen %d\n", req->sfsfd,req->sfsid,req->sfsinode,req->request_type, req->request_state,req->buflen); Index: squid/src/fs/sfs/store_dir_sfs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/sfs/Attic/store_dir_sfs.c,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- squid/src/fs/sfs/store_dir_sfs.c 31 Jan 2001 05:49:37 -0000 1.1.2.6 +++ squid/src/fs/sfs/store_dir_sfs.c 31 Jan 2001 15:09:35 -0000 1.1.2.7 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_sfs.c,v 1.1.2.6 2001/01/31 05:49:37 darius Exp $ + * $Id: store_dir_sfs.c,v 1.1.2.7 2001/01/31 15:09:35 adri Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -352,12 +352,12 @@ int fd = -1; tlv *tlv_list; tlv *t; - assert(rb != NULL); - debug(20, 3) ("storeSfsDirRebuildFromDirectory: DIR #%d\n", rb->sd->index); - sfsblock_t currentEntry; sfsinfo_t *sfsinfo = rb->sd->fsdata; + assert(rb != NULL); + debug(20, 3) ("storeSfsDirRebuildFromDirectory: DIR #%d\n", rb->sd->index); + /* We don't do anything right now */ storeRebuildComplete(&rb->counts); return; @@ -1369,7 +1369,7 @@ } #endif /* Return 999 (99.9%) constant load */ - return 999; + return 0; } /*