lock_ConvertRToW(&buf_globalLock);
if (bp->refCount == 0 &&
- !(bp->flags & CM_BUF_INLRU)) {
+ !(bp->qFlags & CM_BUF_QINLRU)) {
osi_QAdd((osi_queue_t **) &cm_data.buf_freeListp, &bp->q);
/* watch for transition from empty to one element */
if (!cm_data.buf_freeListEndp)
cm_data.buf_freeListEndp = cm_data.buf_freeListp;
- bp->flags |= CM_BUF_INLRU;
+ bp->qFlags |= CM_BUF_QINLRU;
}
if (!writeLocked)
if (refCount == 0) {
lock_ObtainWrite(&buf_globalLock);
if (bp->refCount == 0 &&
- !(bp->flags & CM_BUF_INLRU)) {
+ !(bp->qFlags & CM_BUF_QINLRU)) {
osi_QAdd((osi_queue_t **) &cm_data.buf_freeListp, &bp->q);
/* watch for transition from empty to one element */
if (!cm_data.buf_freeListEndp)
cm_data.buf_freeListEndp = cm_data.buf_freeListp;
- bp->flags |= CM_BUF_INLRU;
+ bp->qFlags |= CM_BUF_QINLRU;
}
lock_ReleaseWrite(&buf_globalLock);
}
*/
lock_ObtainMutex(&bp->mx);
- if (bp->flags & CM_BUF_DIRTY && !(bp->flags & CM_BUF_REDIR)) {
+ if (bp->flags & CM_BUF_DIRTY && !(bp->qFlags & CM_BUF_QREDIR)) {
/* start cleaning the buffer; don't touch log pages since
* the log code counts on knowing exactly who is writing
* a log page at any given instant.
#endif
*bpp = bp->dirtyp;
bp->dirtyp = NULL;
- bp->flags &= ~CM_BUF_INDL;
+ bp->qFlags &= ~CM_BUF_QINDL;
if (cm_data.buf_dirtyListp == NULL)
cm_data.buf_dirtyListEndp = NULL;
else if (cm_data.buf_dirtyListEndp == bp)
cm_data.buf_allp = bp;
osi_QAdd((osi_queue_t **)&cm_data.buf_freeListp, &bp->q);
- bp->flags |= CM_BUF_INLRU;
+ bp->qFlags |= CM_BUF_QINLRU;
lock_InitializeMutex(&bp->mx, "Buffer mutex", LOCK_HIERARCHY_BUFFER);
/* grab appropriate number of bytes from aligned zone */
"incorrect cm_buf_t flags");
lock_AssertWrite(&buf_globalLock);
- if (bp->flags & CM_BUF_INHASH) {
+ if (bp->qFlags & CM_BUF_QINHASH) {
/* Remove from hash */
i = BUF_HASH(&bp->fid, &bp->offset);
if (nextBp)
nextBp->fileHashBackp = prevBp;
- bp->flags &= ~CM_BUF_INHASH;
+ bp->qFlags &= ~CM_BUF_QINHASH;
}
/* make the fid unrecognizable */
*/
/* Don't recycle a buffer held by the redirector. */
- if (bp->flags & CM_BUF_REDIR)
+ if (bp->qFlags & CM_BUF_QREDIR)
continue;
/* don't recycle someone in our own chunk */
* appropriate label, if requested.
*/
if (scp) {
- bp->flags |= CM_BUF_INHASH;
+ bp->qFlags |= CM_BUF_QINHASH;
bp->fid = scp->fid;
#ifdef DEBUG
bp->scp = scp;
/* we should move it from the lru queue. It better still be there,
* since we've held the global (big) lock since we found it there.
*/
- osi_assertx(bp->flags & CM_BUF_INLRU,
+ osi_assertx(bp->qFlags & CM_BUF_QINLRU,
"buf_GetNewLocked: LRU screwup");
if (cm_data.buf_freeListEndp == bp) {
cm_data.buf_freeListEndp = (cm_buf_t *) osi_QPrev(&bp->q);
}
osi_QRemove((osi_queue_t **) &cm_data.buf_freeListp, &bp->q);
- bp->flags &= ~CM_BUF_INLRU;
+ bp->qFlags &= ~CM_BUF_QINLRU;
/* prepare to return it. Give it a refcount */
bp->refCount = 1;
* being recycled) when we're done in buf_Release.
*/
lock_ObtainWrite(&buf_globalLock);
- if (bp->flags & CM_BUF_INLRU) {
+ if (bp->qFlags & CM_BUF_QINLRU) {
if (cm_data.buf_freeListEndp == bp)
cm_data.buf_freeListEndp = (cm_buf_t *) osi_QPrev(&bp->q);
osi_QRemove((osi_queue_t **) &cm_data.buf_freeListp, &bp->q);
- bp->flags &= ~CM_BUF_INLRU;
+ bp->qFlags &= ~CM_BUF_QINLRU;
}
lock_ReleaseWrite(&buf_globalLock);
* has been invalidate (by having its DV stomped upon), then
* count it as free, since it isn't really being utilized.
*/
- if (!(bufp->flags & CM_BUF_INHASH) || bufp->dataVersion == CM_BUF_VERSION_BAD)
+ if (!(bufp->qFlags & CM_BUF_QINHASH) || bufp->dataVersion == CM_BUF_VERSION_BAD)
count++;
}
lock_ReleaseRead(&buf_globalLock);
* already there.
*/
lock_ObtainWrite(&buf_globalLock);
- if (!(bp->flags & CM_BUF_INDL)) {
+ if (!(bp->qFlags & CM_BUF_QINDL)) {
buf_HoldLocked(bp);
if (!cm_data.buf_dirtyListp) {
cm_data.buf_dirtyListp = cm_data.buf_dirtyListEndp = bp;
cm_data.buf_dirtyListEndp = bp;
}
bp->dirtyp = NULL;
- bp->flags |= CM_BUF_INDL;
+ bp->qFlags |= CM_BUF_QINDL;
}
lock_ReleaseWrite(&buf_globalLock);
}
StringCbPrintfA(output, sizeof(output),
"%s bp=0x%08X, hash=%d, fid (cell=%d, volume=%d, "
"vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
- "flags=0x%x, cmFlags=0x%x, error=0x%x, refCount=%d\r\n",
+ "flags=0x%x, qFlags=0x%x cmFlags=0x%x, error=0x%x, refCount=%d\r\n",
cookie, (void *)bp, i, bp->fid.cell, bp->fid.volume,
bp->fid.vnode, bp->fid.unique, bp->offset.HighPart,
- bp->offset.LowPart, bp->dataVersion, bp->flags,
+ bp->offset.LowPart, bp->dataVersion, bp->flags, bp->qFlags,
bp->cmFlags, bp->error, bp->refCount);
WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
}
StringCbPrintfA(output, sizeof(output),
"%s bp=0x%08X, fid (cell=%d, volume=%d, "
"vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
- "flags=0x%x, cmFlags=0x%x, error=0x%x, refCount=%d\r\n",
+ "flags=0x%x, qFlags=0x%x, cmFlags=0x%x, error=0x%x, refCount=%d\r\n",
cookie, (void *)bp, bp->fid.cell, bp->fid.volume,
bp->fid.vnode, bp->fid.unique, bp->offset.HighPart,
- bp->offset.LowPart, bp->dataVersion, bp->flags,
+ bp->offset.LowPart, bp->dataVersion, bp->flags, bp->qFlags,
bp->cmFlags, bp->error, bp->refCount);
WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
}
StringCbPrintfA(output, sizeof(output),
"%s bp=0x%08X, fid (cell=%d, volume=%d, "
"vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
- "flags=0x%x, cmFlags=0x%x, error=0x%x, refCount=%d\r\n",
+ "flags=0x%x, qFlags=0x%x, cmFlags=0x%x, error=0x%x, refCount=%d\r\n",
cookie, (void *)bp, bp->fid.cell, bp->fid.volume,
bp->fid.vnode, bp->fid.unique, bp->offset.HighPart,
- bp->offset.LowPart, bp->dataVersion, bp->flags,
+ bp->offset.LowPart, bp->dataVersion, bp->flags, bp->qFlags,
bp->cmFlags, bp->error, bp->refCount);
WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
}