store client bug

From: Adrian Chadd <adrian@dont-contact.us>
Date: Thu, 25 May 2000 19:19:58 +0800

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?

Adrian

-- 
Adrian Chadd			Build a man a fire, and he's warm for the
<adrian@creative.net.au>	rest of the evening. Set a man on fire and
				he's warm for the rest of his life.
Received on Thu May 25 2000 - 05:20:04 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:26 MST