windows-get-buffer-20071228
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 28 Dec 2007 07:24:48 +0000 (07:24 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 28 Dec 2007 07:24:48 +0000 (07:24 +0000)
commit33aeecd83f8ce670269868145648ae6e277cf3cb
treebfa2ab1537a1866ce5a0b6ee0d6027a05fdd835d
parentd942d97ed82b9f4b86fdea8443912ec64b28dd96
windows-get-buffer-20071228

LICENSE MIT

cm_BkgPrefetch() contained two errors.  First, the loop at the top of the
function that ensures that a cm_buf_t is allocated for each of the offset
positions failed to actually obtain the buffer for the specified offset.
Instead, it repeatedly obtained the buffer for the starting base address.

Second, cm_GetBuffer() would reserve all of the buffers associated with
the cm_scache_t even in the case where we already have a callback and the
existing buffer has the proper data version number.  In that situation
reserving the buffers simply wastes valuable time.
src/WINNT/afsd/cm_dcache.c