On Thu, 25 May 2000, Adrian Chadd wrote:
> 
> 
> 
> Why is this code like this:
> 
> store_client.c:300
> 
>         } else if (!sc->flags.disk_io_pending) {
>             sc->flags.disk_io_pending = 1;
>             storeSwapInStart(sc);
>             if (NULL == sc->swapin_sio) {
>                 storeClientCallback(sc, -1);
>                 return;
>             }
>             /*
>              * If the open succeeds we either copy from memory, or
>              * schedule a disk read in the next block.
>              */
> 
> Why is the code setting disk_io_pending ? THe problem in the current
> souce tree is that disk_io_pending is set to 1, then a read is scheduled
> at the end of tostClientCopy3() (where this code is also from) and
> triggers an assertion :
> 
>     /* What the client wants is not in memory. Schedule a disk read */
>     assert(STORE_DISK_CLIENT == sc->type);
>     assert(!sc->flags.disk_io_pending);
>     debug(20, 3) ("storeClientCopy3: reading from STORE\n");
>     storeClientFileRead(sc);
> 
> I've commented the code out and I can't see any ill effects. Am I
> missing something?
Your fix is correct.  It was introduced when I merged
the 2.3 branch to head.
http://www.squid-cache.org/cgi-bin/cvsweb.cgi/squid/src/store_client.c.diff?r1=1.90&r2=1.91
Duane W.
Received on Mon May 29 2000 - 22:56:58 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:26 MST