Re: a refresh problem?

From: Michael O'Reilly <michael@dont-contact.us>
Date: 25 Feb 1998 12:32:16 +0800

Stewart Forster <slf@connect.com.au> writes:
> > The client side asks to fill a 4KB buffer:
> >
> > 1998/02/24 23:56:26| storeClientCopy: 3AB79EC8F47EF63C16B971700C7CF709,
> > seen 0, want 0, size 4096, cb 0x80551c0, cbdata 0x840a600
> >
> > But aiops.c actually reads 8KB
> >
> > 1998/02/24 23:56:26| READ on fd: 22
> > 1998/02/24 23:56:26| DONE: 8192 -> 4

> The ASYNC library simply passes the variables its being given onto
> the read() call. There may be final corruption on the end result, but some
> where 4096 is being turned into 8192, and it sure isn't in the aiops.c or
> async_io.c code. I'll take a dig.

The problem is in storeClientFileRead() which totally ignores the size
passed in the 'sc' struct built by storeClientCopy(), and reads
a DISK_PAGE_SIZE.

static void
storeClientFileRead(store_client * sc)
{
    MemObject *mem = sc->entry->mem_obj;
    assert(sc->callback != NULL);
    if (mem->swap_hdr_sz == 0)
        file_read(sc->swapin_fd,
            memAllocate(MEM_DISK_BUF, 1),
            DISK_PAGE_SIZE, <-------------- this is the problem
                                        as far as I can see. Should be
                                        sc->copy_size here.
            0,
            storeClientReadHeader,
            sc);
    else
[ ... ]
Received on Tue Jul 29 2003 - 13:15:47 MDT

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