git://git.jankratochvil.net
/
captive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b36739d
)
+Comments about AllocationSize/FileSize/ValidDataLength meaning.
author
short
<>
Wed, 13 Aug 2003 09:13:25 +0000
(09:13 +0000)
committer
short
<>
Wed, 13 Aug 2003 09:13:25 +0000
(09:13 +0000)
src/libcaptive/cc/sharedcachemap-priv.h
patch
|
blob
|
history
diff --git
a/src/libcaptive/cc/sharedcachemap-priv.h
b/src/libcaptive/cc/sharedcachemap-priv.h
index
0d69717
..
084948e
100644
(file)
--- a/
src/libcaptive/cc/sharedcachemap-priv.h
+++ b/
src/libcaptive/cc/sharedcachemap-priv.h
@@
-44,8
+44,20
@@
struct _CaptiveSharedCacheMapObject {
FILE_OBJECT *FileObject;
SECTION_OBJECT_POINTERS *SectionObjectPointers;
/* ValidDataLength<=FileSize<=AllocationSize */
FILE_OBJECT *FileObject;
SECTION_OBJECT_POINTERS *SectionObjectPointers;
/* ValidDataLength<=FileSize<=AllocationSize */
+ /* 'AllocationSize' sets the mmap(2)ed area of buffers of this SharedCacheMap.
+ * We must reallocate this area if 'AllocationSize' changes and in such case
+ * there must exist no map-Bcb or pin-Bcbs for it.
+ * We would cope with 'buffer' change with existing Bcbs but W32 client could not.
+ */
guint64 AllocationSize; /* ==CC_FILE_SIZES.AllocationSize.QuadPart */
guint64 AllocationSize; /* ==CC_FILE_SIZES.AllocationSize.QuadPart */
+ /* We generally check against CAPTIVE_ROUND_UP64(FileSize,PAGE_SIZE)
+ * as the offsets are usually PAGE_SIZE aligned due to pin-Bcb expectations.
+ */
guint64 FileSize; /* ==CC_FILE_SIZES.FileSize.QuadPart */
guint64 FileSize; /* ==CC_FILE_SIZES.FileSize.QuadPart */
+ /* We use 'FileSize' instead of 'ValidDataLength' as I assume W32
+ * automatically increases 'ValidDataLength' during Cache Manager write operations.
+ * We do not increase it and therefore it is mostly useless for us.
+ */
guint64 ValidDataLength; /* ==CC_FILE_SIZES.ValidDataLength.QuadPart */
CACHE_MANAGER_CALLBACKS CallBacks;
VOID *LazyWriterContext;
guint64 ValidDataLength; /* ==CC_FILE_SIZES.ValidDataLength.QuadPart */
CACHE_MANAGER_CALLBACKS CallBacks;
VOID *LazyWriterContext;