Windows: Modify signature of buf_CleanAsync and buf_CleanAsyncLocked
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 3 Sep 2010 01:17:24 +0000 (21:17 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Mon, 6 Sep 2010 03:57:06 +0000 (20:57 -0700)
commit1ef135110b7d850e2c40bbbb6b7de69c76872fa9
tree172f28d494f3435974c0fcc50390ed44fcd8bd30
parentfa961c02fbb7dc54fa4c02c38dfd07c44eb696d3
Windows: Modify signature of buf_CleanAsync and buf_CleanAsyncLocked

The buf_CleanAsync() and buf_CleanAsyncLocked() signature does
not include a cm_scache_t pointer even though buf_CleanAsyncLocked()
needs a pointer to the matching cm_scache_t object.  There are
some calls when the cm_scache_t object is already known.  For those
cases it is more efficient to avoid the additional lookup especially
when buf_CleanAsync*() is being called on every buffer associated
with the cm_scache_t object.

At the same time add a flags field and a constant
CM_BUF_WRITE_SCP_LOCKED to permit the lock state of the cm_scache_t
to be passed in.

Finally, fix up the usage in buf_FlushCleanPages() which gains
the most from these changes.

LICENSE MIT

Change-Id: I3726441ff83a89e24d790174ca71396d633f1be6
Reviewed-on: http://gerrit.openafs.org/2662
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_buf.h
src/WINNT/afsd/cm_dcache.c