1 Index: squid3/src/fs/coss/store_dir_coss.cc
2 diff -c squid3/src/fs/coss/store_dir_coss.cc:1.48 squid3/src/fs/coss/store_dir_coss.cc:1.49
3 *** squid3/src/fs/coss/store_dir_coss.cc:1.48 Wed Aug 27 15:19:38 2003
4 --- squid3/src/fs/coss/store_dir_coss.cc Sat Aug 30 00:39:24 2003
8 if (max_size > (max_offset>>10)) {
9 debug(47,0)("COSS block-size = %d bytes\n", 1<<blksz_bits);
10 ! debug(47,0)("COSS largest file offset = %llu KB\n", max_offset >> 10);
11 debug(47,0)("COSS cache_dir size = %d KB\n", max_size);
12 fatal("COSS cache_dir size exceeds largest offset\n");
16 if (max_size > (max_offset>>10)) {
17 debug(47,0)("COSS block-size = %d bytes\n", 1<<blksz_bits);
18 ! debugs(47,0, "COSS largest file offset = " << (max_offset >> 10) << " KB");
19 debug(47,0)("COSS cache_dir size = %d KB\n", max_size);
20 fatal("COSS cache_dir size exceeds largest offset\n");
22 Index: squid3/src/fs/coss/store_io_coss.cc
23 diff -c squid3/src/fs/coss/store_io_coss.cc:1.23 squid3/src/fs/coss/store_io_coss.cc:1.24
24 *** squid3/src/fs/coss/store_io_coss.cc:1.23 Wed Aug 27 15:19:38 2003
25 --- squid3/src/fs/coss/store_io_coss.cc Sat Aug 30 00:39:24 2003
29 /* Check if we have overflowed the disk .. */
30 /* SD->max_size is int, so cast to (off_t) *before* bit-shifting */
31 ! if ((SD->current_offset + allocsize) > ((off_t)SD->max_size << 10)) {
33 * tried to allocate past the end of the disk, so wrap
34 * back to the beginning
37 /* Check if we have overflowed the disk .. */
38 /* SD->max_size is int, so cast to (off_t) *before* bit-shifting */
39 ! if ((off_t)(SD->current_offset + allocsize) > ((off_t)SD->max_size << 10)) {
41 * tried to allocate past the end of the disk, so wrap
42 * back to the beginning
45 for (m = membufs.head; m; m = m->next) {
46 t = (CossMemBuf *)m->data;
48 ! if ((o >= t->diskstart) && (o < t->diskend))
53 for (m = membufs.head; m; m = m->next) {
54 t = (CossMemBuf *)m->data;
56 ! if ((o >= (off_t)t->diskstart) && (o < (off_t)t->diskend))
62 if (curfn == e->swap_filen)
63 *collision = 1; /* Mark an object alloc collision */
65 ! if ((o >= newmb->diskstart) && (o < newmb->diskend)) {
70 if (curfn == e->swap_filen)
71 *collision = 1; /* Mark an object alloc collision */
73 ! if ((o >= (off_t)newmb->diskstart) && (o < (off_t)newmb->diskend)) {