Windows: Restore "fs getcacheparms" used space
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 1 Dec 2012 12:30:57 +0000 (07:30 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Mon, 3 Dec 2012 22:06:43 +0000 (14:06 -0800)
commit66a5703463baad5739b6d47ed12d0a3a7b0c489a
tree0e830d59912e6033de73db72c2c347acef8e922c
parentbe27d61961cb490e3f1033d9e0943d2655b73b8a
Windows: Restore "fs getcacheparms" used space

buf_Init() adds all of the available buffers to the free queue
at startup and cm_data.buf_freeCount tracks the number of items
in the free queue.  So it cannot be used as a method of reporting
how much of the cache space has been used.   Add a new buf_usedCount
parameter to the cm_memmap data to track the number of cache blocks
that have been used up to the total number of allocated blocks.
buf_usedCount can then be used in cm_IoctlGetCacheParms to restore
the original behavior.

Change-Id: I3ecdfdbda1c423551b7e7691243696e0f1553edc
Reviewed-on: http://gerrit.openafs.org/8578
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_ioctl.c
src/WINNT/afsd/cm_memmap.c
src/WINNT/afsd/cm_memmap.h